about summary refs log tree commit diff
path: root/src/thread/pthread_barrier_wait.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-08-22 23:49:54 -0400
committerRich Felker <dalias@aerifal.cx>2014-08-22 23:49:54 -0400
commitb8ca9eb5301580dcf101753451eee196edceefbd (patch)
tree9602bfb40fbb328360bd024d2e416824cea63337 /src/thread/pthread_barrier_wait.c
parenta6293285e930dbdb0eff47e29b513ca22537b1a2 (diff)
downloadmusl-b8ca9eb5301580dcf101753451eee196edceefbd.tar.gz
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/pthread_barrier_wait.c')
-rw-r--r--src/thread/pthread_barrier_wait.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_barrier_wait.c b/src/thread/pthread_barrier_wait.c
index 6b329c95..4a964fe3 100644
--- a/src/thread/pthread_barrier_wait.c
+++ b/src/thread/pthread_barrier_wait.c
@@ -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;
 	}