projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f5ba92
)
timedwait: play it safe for now
author
Rich Felker
<dalias@aerifal.cx>
Wed, 3 Aug 2011 12:36:13 +0000
(08:36 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 3 Aug 2011 12:36:13 +0000
(08:36 -0400)
it's unclear whether EINVAL or ENOSYS is used when the operation is
not supported, so check for both...
src/thread/__timedwait.c
patch
|
blob
|
history
diff --git
a/src/thread/__timedwait.c
b/src/thread/__timedwait.c
index
0444d39
..
e15e2d0
100644
(file)
--- 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;