fix fallback checks for kernels without private futex support
for unknown syscall commands, the kernel produces ENOSYS, not EINVAL.
This commit is contained in:
@@ -87,7 +87,7 @@ int pthread_barrier_wait(pthread_barrier_t *b)
|
||||
a_spin();
|
||||
a_inc(&inst->finished);
|
||||
while (inst->finished == 1)
|
||||
__syscall(SYS_futex,&inst->finished,FUTEX_WAIT|128,1,0) != -EINTR
|
||||
__syscall(SYS_futex,&inst->finished,FUTEX_WAIT|128,1,0) != -ENOSYS
|
||||
|| __syscall(SYS_futex,&inst->finished,FUTEX_WAIT,1,0);
|
||||
return PTHREAD_BARRIER_SERIAL_THREAD;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user