fix fallback checks for kernels without private futex support

for unknown syscall commands, the kernel produces ENOSYS, not EINVAL.
This commit is contained in:
Rich Felker
2014-08-22 23:49:54 -04:00
parent a6293285e9
commit b8ca9eb530
5 changed files with 5 additions and 5 deletions

View File

@ -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);