https://bugs.gentoo.org/452184
private), 0, 0);
if (INTERNAL_SYSCALL_ERROR_P (e, __err)
- && INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK)
+ && ((INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK)
+ || (INTERNAL_SYSCALL_ERRNO (e, __err) == EAGAIN)))
{
THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL);
rt.tv_sec = sec;
rt.tv_nsec = nsec;
err = do_futex_timed_wait(isem, &rt);
- if (err != 0 && err != -EWOULDBLOCK)
+ if (err != 0 && err != -EWOULDBLOCK && err != -EAGAIN)
{
__set_errno (-err);
err = -1;
while (1)
{
err = do_futex_wait(isem);
- if (err != 0 && err != -EWOULDBLOCK)
+ if (err != 0 && err != -EWOULDBLOCK && err != -EAGAIN)
{
__set_errno (-err);
err = -1;
/* Disable asynchronous cancellation. */
__pthread_disable_asynccancel (oldtype);
}
- while (err == 0 || err == -EWOULDBLOCK);
+ while (err == 0 || err == -EWOULDBLOCK || err == -EAGAIN);
__set_errno (-err);
return -1;