int fputc(int c, FILE* f) { if (atomic_load(&f->lock) < 0 || !__lockfile(f)) return putc_unlocked(c, f); c = putc_unlocked(c, f); __unlockfile(f); return c; }
int fputc(int c, FILE *f) { if (f->lock < 0 || !__lockfile(f)) return putc_unlocked(c, f); c = putc_unlocked(c, f); __unlockfile(f); return c; }
int fgetc(FILE* f) { int c; if (atomic_load(&f->lock) < 0 || !__lockfile(f)) return getc_unlocked(f); c = getc_unlocked(f); __unlockfile(f); return c; }
int fputc(int c, FILE *f) { if (f->lock_owner == STDIO_SINGLETHREADED || !__lockfile(f)) return putc_unlocked(c, f); c = putc_unlocked(c, f); __unlockfile(f); return c; }
int fgetc(FILE* f) { int c; if (f->lock < 0 || !__lockfile(f)) return getc_unlocked(f); c = getc_unlocked(f); __unlockfile(f); return c; }
int getc(FILE *f) { int c; if (f->no_locking || !__lockfile(f)) return getc_unlocked(f); c = getc_unlocked(f); __unlockfile(f); return c; }
void flockfile(FILE *f) { if (!libc.threaded) pthread_self(); __lockfile(f); }