projects
/
oweals
/
musl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix indention with spaces in powerpc asm
[oweals/musl.git]
/
src
/
stdio
/
flockfile.c
diff --git
a/src/stdio/flockfile.c
b/src/stdio/flockfile.c
index 440a36a9aecb9bfb1a08907d2c91ab9513da19e5..a196c1efe0af11663f5e0537a0de1db02c3982ef 100644
(file)
--- a/
src/stdio/flockfile.c
+++ b/
src/stdio/flockfile.c
@@
-3,9
+3,8
@@
void flockfile(FILE *f)
{
-
if (!libc.lockfile
) {
-
pthread_self()
;
-
libc.lockfile = __lockfile
;
+
while (ftrylockfile(f)
) {
+
int owner = f->lock
;
+
if (owner) __wait(&f->lock, &f->waiters, owner, 1)
;
}
- __lockfile(f);
}