X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2F__timedwait.c;h=b1d3af2382fa36ba8715c0731c650873512caff6;hp=28b777bc225289343c7da5e1e9eed54b578e70f4;hb=6232b96f5153d0b718054a8bc569fcd7d596bab2;hpb=be82e122bf37fdcd1766d1ed220f0300b30ab6a3 diff --git a/src/thread/__timedwait.c b/src/thread/__timedwait.c index 28b777bc..b1d3af23 100644 --- a/src/thread/__timedwait.c +++ b/src/thread/__timedwait.c @@ -2,7 +2,7 @@ #include #include "futex.h" #include "syscall.h" -#include + int __timedwait(volatile int *addr, int val, clockid_t clk, const struct timespec *at, int priv) { int r; @@ -17,7 +17,7 @@ int __timedwait(volatile int *addr, int val, clockid_t clk, const struct timespe if (to.tv_sec < 0) return ETIMEDOUT; } if (priv) priv = 128; priv=0; - r = -__syscall(__NR_futex, (long)addr, FUTEX_WAIT | priv, val, at ? (long)&to : 0); - if (r == ETIMEDOUT) return r; + r = -__syscall(SYS_futex, (long)addr, FUTEX_WAIT | priv, val, at ? (long)&to : 0); + if (r == ETIMEDOUT || r == EINTR) return r; return 0; }