author | Rich Felker <dalias@aerifal.cx> | 2015年06月16日 07:11:19 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015年06月16日 07:11:19 +0000 |
commit | 1b0cdc8700d29ef018bf226d74b2b58b23bce91c (patch) | |
tree | 53c58824a9d73de47296b5a8885aefc9a1f39d0b /src/stdio/fflush.c | |
parent | f22a9edaf8a6f2ca1d314d18b3785558279a5c03 (diff) | |
download | musl-1b0cdc8700d29ef018bf226d74b2b58b23bce91c.tar.gz |
-rw-r--r-- | src/stdio/fflush.c | 5 |
diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c index 7bf862a6..3f462c80 100644 --- a/src/stdio/fflush.c +++ b/src/stdio/fflush.c @@ -35,13 +35,12 @@ int fflush(FILE *f) r = __stdout_used ? fflush(__stdout_used) : 0; - OFLLOCK(); - for (f=libc.ofl_head; f; f=f->next) { + for (f=*__ofl_lock(); f; f=f->next) { FLOCK(f); if (f->wpos > f->wbase) r |= __fflush_unlocked(f); FUNLOCK(f); } - OFLUNLOCK(); + __ofl_unlock(); return r; } |