diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-08-03 08:36:13 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-08-03 08:36:13 -0400 |
commit | 8aeee8db21858becb45a8e9f6b5bc23109638bcb (patch) | |
tree | 11475e62d962a59638305945f7beb686bddcb923 /src/thread | |
parent | 4f5ba9211e2b8e176ff9dfee3bdb0453cbc4d59b (diff) | |
download | musl-8aeee8db21858becb45a8e9f6b5bc23109638bcb.tar.gz musl-8aeee8db21858becb45a8e9f6b5bc23109638bcb.tar.xz musl-8aeee8db21858becb45a8e9f6b5bc23109638bcb.zip |
timedwait: play it safe for now
it's unclear whether EINVAL or ENOSYS is used when the operation is not supported, so check for both...
Diffstat (limited to 'src/thread')
-rw-r--r-- | src/thread/__timedwait.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/__timedwait.c b/src/thread/__timedwait.c index 0444d39f..e15e2d0a 100644 --- a/src/thread/__timedwait.c +++ b/src/thread/__timedwait.c @@ -16,7 +16,7 @@ static int do_wait(volatile int *addr, int val, clockid_t clk, const struct time if (clk == CLOCK_REALTIME) flag = FUTEX_CLOCK_REALTIME; if (cp) r = -__syscall_cp(SYS_futex, addr, FUTEX_WAIT_BITSET|flag, val, at, 0, -1); else r = -__syscall(SYS_futex, addr, FUTEX_WAIT_BITSET|flag, val, at, 0, -1); - if (r != EINVAL) goto done; + if (r != EINVAL && r != ENOSYS) goto done; } if (clock_gettime(clk, &to)) return EINVAL; to.tv_sec = at->tv_sec - to.tv_sec; |