[PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Nov 29 12:38:00 GMT 2017


On Nov 29 13:36, Corinna Vinschen wrote:
> On Nov 29 13:04, Corinna Vinschen wrote:
> > - If you do async IO, you have to handle STATUS_PENDING gracefully:
> > 
> >   - The IO_STATUS_BLOCK given to NtWriteFile *must* exist for the
> >     entire time the operation takes after NtWriteFile returned
> >     STATUS_PENDING.  An IO_STATUS_BLOCK fhandler member comes to mind,
> >     maybe fhandler_base_overlapped::io_status can be reused.
> 
> No, wait.  There can be more than one outstanding aio operations on the
> same descriptor.  Therefore the IO_STATUS_BLOCK must be connected to the
> aiocb struct one way or the other, becasue only that struct is local to
> the aio operation.

I guess that's what the Linux man page aio(7) subsumes under

  struct aiocb {
    [...]

    /* Various implementation-internal fields not shown */
  };


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20171129/5f786971/attachment.sig>


More information about the Cygwin-patches mailing list