1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include "stdio_impl.h" #include "pthread_impl.h" void __unlist_locked_file(FILE *); void funlockfile(FILE *f) { if (f->lockcount == 1) { __unlist_locked_file(f); f->lockcount = 0; __unlockfile(f); } else { f->lockcount--; } }