diff options
author | Carlos O'Donell <carlos@systemhalted.org> | 2014-08-10 10:01:43 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-08-10 10:01:43 -0400 |
commit | 9559080132dcd991176e5eb48604405e610534d1 (patch) | |
tree | ef7693c6b9302e3dc3f2729fb042478e94f471d5 | |
parent | 7aaf74a47f7a851329eda4c1e39c9074e2e9e18f (diff) | |
download | glibc-9559080132dcd991176e5eb48604405e610534d1.tar.gz glibc-9559080132dcd991176e5eb48604405e610534d1.tar.xz glibc-9559080132dcd991176e5eb48604405e610534d1.zip |
nptl: handle EAGAIN with some futex operations gentoo/2.19
-rw-r--r-- | nptl/sysdeps/pthread/aio_misc.h | 4 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/gai_misc.h | 4 | ||||
-rw-r--r-- | sunrpc/clnt_udp.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/nptl/sysdeps/pthread/aio_misc.h b/nptl/sysdeps/pthread/aio_misc.h index ac3488c57e..ac3577106f 100644 --- a/nptl/sysdeps/pthread/aio_misc.h +++ b/nptl/sysdeps/pthread/aio_misc.h @@ -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); \ } \ diff --git a/nptl/sysdeps/pthread/gai_misc.h b/nptl/sysdeps/pthread/gai_misc.h index 946275ed75..aa72c4af7c 100644 --- a/nptl/sysdeps/pthread/gai_misc.h +++ b/nptl/sysdeps/pthread/gai_misc.h @@ -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); \ } \ diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 1b6a20b826..41ac54b324 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -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); |