Files
openharmony_kernel_liteos_m/kal/posix/musl_src/stdio/stdout.c
wuyunjie 955b52e4b2 Description:l0 posix interface
Team: OTHERS
Feature or Bugfix:Feature
Binary Source:No
PrivateCode(Yes/No):No

Change-Id: I8bcb92a97a98c61077c55704dec03c997d1246da
ChangeID:13439291
2021-03-27 10:38:56 +08:00

21 lines
489 B
C

#include "stdio_impl.h"
#include <pthread.h>
#undef stdout
static pthread_mutex_t locallock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
static unsigned char buf[BUFSIZ+UNGET];
hidden FILE __stdout_FILE = {
.buf = buf+UNGET,
.buf_size = sizeof buf-UNGET,
.fd = 1,
.flags = F_PERM | F_NORD,
.lbf = '\n',
.write = __stdout_write,
.seek = __stdio_seek,
.close = __stdio_close,
.lock = &locallock,
};
FILE *const stdout = &__stdout_FILE;
FILE *volatile __stdout_used = &__stdout_FILE;