diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-08-22 23:49:54 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-08-22 23:49:54 -0400 |
commit | b8ca9eb5301580dcf101753451eee196edceefbd (patch) | |
tree | 9602bfb40fbb328360bd024d2e416824cea63337 /src/thread/__wait.c | |
parent | a6293285e930dbdb0eff47e29b513ca22537b1a2 (diff) | |
download | musl-b8ca9eb5301580dcf101753451eee196edceefbd.tar.gz musl-b8ca9eb5301580dcf101753451eee196edceefbd.tar.bz2 musl-b8ca9eb5301580dcf101753451eee196edceefbd.tar.xz musl-b8ca9eb5301580dcf101753451eee196edceefbd.zip |
fix fallback checks for kernels without private futex support
for unknown syscall commands, the kernel produces ENOSYS, not EINVAL.
Diffstat (limited to 'src/thread/__wait.c')
-rw-r--r-- | src/thread/__wait.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/__wait.c b/src/thread/__wait.c index ec1e8206..3d0d9204 100644 --- a/src/thread/__wait.c +++ b/src/thread/__wait.c @@ -10,7 +10,7 @@ void __wait(volatile int *addr, volatile int *waiters, int val, int priv) } if (waiters) a_inc(waiters); while (*addr==val) { - __syscall(SYS_futex, addr, FUTEX_WAIT|priv, val, 0) != -EINVAL + __syscall(SYS_futex, addr, FUTEX_WAIT|priv, val, 0) != -ENOSYS || __syscall(SYS_futex, addr, FUTEX_WAIT, val, 0); } if (waiters) a_dec(waiters); |