xref: /third_party/musl/porting/uniproton/kernel/src/stdio/stderr.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/porting/uniproton/kernel/src/stdio/
1570af302Sopenharmony_ci#include "stdio_impl.h"
2570af302Sopenharmony_ci#include <pthread.h>
3570af302Sopenharmony_ci
4570af302Sopenharmony_ci#undef stderr
5570af302Sopenharmony_ci
6570af302Sopenharmony_cistatic pthread_mutex_t locallock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
7570af302Sopenharmony_cistatic unsigned char buf[UNGET];
8570af302Sopenharmony_cihidden FILE __stderr_FILE = {
9570af302Sopenharmony_ci	.buf = buf+UNGET,
10570af302Sopenharmony_ci	.buf_size = 0,
11570af302Sopenharmony_ci	.fd = 2,
12570af302Sopenharmony_ci	.flags = F_PERM | F_NORD,
13570af302Sopenharmony_ci	.lbf = -1,
14570af302Sopenharmony_ci	.write = __stdio_write,
15570af302Sopenharmony_ci	.seek = __stdio_seek,
16570af302Sopenharmony_ci	.close = __stdio_close,
17570af302Sopenharmony_ci	.lock = &locallock,
18570af302Sopenharmony_ci};
19570af302Sopenharmony_ciFILE *const stderr = &__stderr_FILE;
20570af302Sopenharmony_ciFILE *volatile __stderr_used = &__stderr_FILE;
21

Indexes created Thu Nov 07 10:32:03 CST 2024