mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-15 04:20:28 +08:00
nptl: handle EAGAIN with some futex operations
This commit is contained in:
parent
7aaf74a47f
commit
9559080132
@ -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); \
|
||||
} \
|
||||
|
@ -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); \
|
||||
} \
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user