nptl: handle EAGAIN with some futex operations

This commit is contained in:
Carlos O'Donell 2014-08-10 10:01:43 -04:00 committed by Mike Frysinger
parent 7aaf74a47f
commit 9559080132
3 changed files with 5 additions and 5 deletions

View File

@ -50,7 +50,7 @@
{ \ { \
status = lll_futex_timed_wait (futexaddr, oldval, timeout, \ status = lll_futex_timed_wait (futexaddr, oldval, timeout, \
LLL_PRIVATE); \ LLL_PRIVATE); \
if (status != -EWOULDBLOCK) \ if (status != -EWOULDBLOCK && status != -EAGAIN) \
break; \ break; \
\ \
oldval = *futexaddr; \ oldval = *futexaddr; \
@ -65,7 +65,7 @@
else if (status == -ETIMEDOUT) \ else if (status == -ETIMEDOUT) \
result = EAGAIN; \ result = EAGAIN; \
else \ else \
assert (status == 0 || status == -EWOULDBLOCK); \ assert (status == 0 || status == -EWOULDBLOCK || status == -EAGAIN);\
\ \
pthread_mutex_lock (&__aio_requests_mutex); \ pthread_mutex_lock (&__aio_requests_mutex); \
} \ } \

View File

@ -51,7 +51,7 @@
{ \ { \
status = lll_futex_timed_wait (futexaddr, oldval, timeout, \ status = lll_futex_timed_wait (futexaddr, oldval, timeout, \
LLL_PRIVATE); \ LLL_PRIVATE); \
if (status != -EWOULDBLOCK) \ if (status != -EWOULDBLOCK && status != -EAGAIN) \
break; \ break; \
\ \
oldval = *futexaddr; \ oldval = *futexaddr; \
@ -66,7 +66,7 @@
else if (status == -ETIMEDOUT) \ else if (status == -ETIMEDOUT) \
result = EAGAIN; \ result = EAGAIN; \
else \ else \
assert (status == 0 || status == -EWOULDBLOCK); \ assert (status == 0 || status == -EWOULDBLOCK || status == -EAGAIN);\
\ \
pthread_mutex_lock (&__gai_requests_mutex); \ pthread_mutex_lock (&__gai_requests_mutex); \
} \ } \

View File

@ -463,7 +463,7 @@ send_again:
while (inlen < 0 && errno == EINTR); while (inlen < 0 && errno == EINTR);
if (inlen < 0) if (inlen < 0)
{ {
if (errno == EWOULDBLOCK) if (errno == EWOULDBLOCK || errno == EAGAIN)
continue; continue;
cu->cu_error.re_errno = errno; cu->cu_error.re_errno = errno;
return (cu->cu_error.re_status = RPC_CANTRECV); return (cu->cu_error.re_status = RPC_CANTRECV);