Re: [PATCH v3 1/3] POSIX Asynchronous I/O support: aio files

2018-07-17 Thread Mark Geisert
Corinna Vinschen wrote: Hey Mark, I just belatedly noticed a few problems in aiosuspend: On Jul 15 01:20, Mark Geisert wrote: +static int +aiosuspend (const struct aiocb *const aiolist[], + int nent, const struct timespec *timeout) +{ + /* Returns lowest list index of completed aios,

Re: [PATCH v3 2/3] POSIX Asynchronous I/O support: fhandler files

2018-07-17 Thread Mark Geisert
Corinna Vinschen wrote: On Jul 15 01:20, Mark Geisert wrote: + if (aio) + status = NtReadFile (prw_handle, aiocb->aio_win_event, NULL, NULL, +>aio_win_iosb, buf, count, , NULL); + else + status = NtReadFile (prw_handle, NULL, NULL, NULL, , buf,

Re: [PATCH v3 1/3] POSIX Asynchronous I/O support: aio files

2018-07-17 Thread Mark Geisert
Corinna Vinschen wrote: Hi Mark, this looks good. Inline comments as usual. Thank you; OK. On Jul 15 01:20, Mark Geisert wrote: [...] +static int +aiochkslot (struct aiocb *aio) +{ + /* Sanity check.. make sure this AIO is not already busy */ + for (int slot = 0; slot < AIO_MAX;

Re: [PATCH v3 1/3] POSIX Asynchronous I/O support: aio files

2018-07-17 Thread Corinna Vinschen
Mark, I think there's a bug in sigtimedwait. I just found the problem while looking into this aio_suspend stuff: On Jul 17 16:51, Corinna Vinschen wrote: > > + res = sigtimedwait (, , to); You're giving the timeout value verbatim to sigtimedwait(). Let's have a look into sigtimedwait, per

Re: [PATCH v3 1/3] POSIX Asynchronous I/O support: aio files

2018-07-17 Thread Corinna Vinschen
Hey Mark, I just belatedly noticed a few problems in aiosuspend: On Jul 15 01:20, Mark Geisert wrote: > +static int > +aiosuspend (const struct aiocb *const aiolist[], > + int nent, const struct timespec *timeout) > +{ > + /* Returns lowest list index of completed aios, else 'nent' if