1#include "stdio_impl.h" 2 3int 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 12weak_alias(getc, _IO_getc); 13
1#include "stdio_impl.h" 2 3int 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 12weak_alias(getc, _IO_getc); 13