cosmopolitan/libc/stdio/fflush.internal.h
Justine Tunney fa20edc44d
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
2023-11-28 14:39:42 -08:00

26 lines
544 B
C

#ifndef COSMOPOLITAN_LIBC_STDIO_FFLUSH_H_
#define COSMOPOLITAN_LIBC_STDIO_FFLUSH_H_
#include "libc/stdio/stdio.h"
#include "libc/thread/thread.h"
#include "libc/thread/tls.h"
COSMOPOLITAN_C_START_
struct StdioFlushHandles {
size_t i, n;
FILE **p;
};
struct StdioFlush {
struct StdioFlushHandles handles;
FILE *handles_initmem[8];
};
extern struct StdioFlush __fflush;
extern pthread_mutex_t __fflush_lock_obj;
void __fflush_lock(void);
void __fflush_unlock(void);
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_STDIO_FFLUSH_H_ */