mirror of
https://github.com/fluencelabs/musl
synced 2025-06-29 14:42:01 +00:00
fix fallback checks for kernels without private futex support
for unknown syscall commands, the kernel produces ENOSYS, not EINVAL.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user