1 #include "stdio_impl.h"
2 
fputc(int c,FILE * f)3 int fputc(int c, FILE* f) {
4     if (atomic_load(&f->lock) < 0 || !__lockfile(f))
5         return putc_unlocked(c, f);
6     c = putc_unlocked(c, f);
7     __unlockfile(f);
8     return c;
9 }
10