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
+1 -1
View File
@@ -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;
}