Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 2 years ago
parent
commit
9c8cd85223
  1. 19
      ev_linuxaio.c

19
ev_linuxaio.c

@ -299,9 +299,18 @@ linuxaio_modify (EV_P_ int fd, int oev, int nev)
if (iocb->io.aio_buf)
{
evsys_io_cancel (linuxaio_ctx, &iocb->io, (struct io_event *)0);
/* on relevant kernels, io_cancel fails with EINPROGRES if everything is fine */
assert (("libev: linuxaio unexpected io_cancel failed", errno == EINPROGRESS || errno == EINTR));
for (;;)
{
/* on all relevant kernels, io_cancel fails with EINPROGRESS on "success" */
if (expect_false (evsys_io_cancel (linuxaio_ctx, &iocb->io, (struct io_event *)0) == 09)
break;
if (expect_true (errno == EINPROGRESS))
break;
/* the EINPROGRESS test is for nicer error message. clumsy. */
assert (("libev: linuxaio unexpected io_cancel failed", errno != EINPROGRESS && errno != EINTR));
}
}
if (nev)
@ -555,8 +564,8 @@ linuxaio_poll (EV_P_ ev_tstamp timeout)
res = 1; /* skip this iocb */
}
else if (errno == EINTR)
/* silently ignored */;
else if (errno == EINTR) /* not seen in reality, not documented */
res = 0; /* silently ignore and retry */
else
ev_syserr ("(libev) linuxaio io_submit");

Loading…
Cancel
Save