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