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, \
LLL_PRIVATE); \
if (status != -EWOULDBLOCK) \
if (status != -EWOULDBLOCK && status != -EAGAIN) \
break; \
\
oldval = *futexaddr; \
@ -65,7 +65,7 @@
else if (status == -ETIMEDOUT) \
result = EAGAIN; \
else \
assert (status == 0 || status == -EWOULDBLOCK); \
assert (status == 0 || status == -EWOULDBLOCK || status == -EAGAIN);\
\
pthread_mutex_lock (&__aio_requests_mutex); \
} \

View File

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

View File

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