From b8ca9eb5301580dcf101753451eee196edceefbd Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 22 Aug 2014 23:49:54 -0400 Subject: fix fallback checks for kernels without private futex support for unknown syscall commands, the kernel produces ENOSYS, not EINVAL. --- src/internal/pthread_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/internal/pthread_impl.h') diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index 2d090f8f..4de66378 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -112,7 +112,7 @@ static inline void __wake(volatile void *addr, int cnt, int priv) { if (priv) priv = 128; if (cnt<0) cnt = INT_MAX; - __syscall(SYS_futex, addr, FUTEX_WAKE|priv, cnt) != -EINVAL || + __syscall(SYS_futex, addr, FUTEX_WAKE|priv, cnt) != -ENOSYS || __syscall(SYS_futex, addr, FUTEX_WAKE, cnt); } -- cgit v1.2.1