Debian Codegraph @

libc-top-half/musl/src/stdio/ofl.c

raw
1 #include "stdio_impl.h"
2 #include "lock.h"
3 #include "fork_impl.h"
4
5 static FILE *ofl_head;
6 #if defined(__wasilibc_unmodified_upstream) || defined(_REENTRANT)
7 static volatile int ofl_lock[1];
8 volatile int *const __stdio_ofl_lockptr = ofl_lock;
9 #endif
10
11 FILE **__ofl_lock()
12 {
13 LOCK(ofl_lock);
14 return &ofl_head;
15 }
16
17 void __ofl_unlock()
18 {
19 UNLOCK(ofl_lock);
20 }