This is the mail archive of the cygwin-developers mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Mar 19 22:53, Mark Geisert wrote: > Corinna Vinschen wrote (a while back): > > However, using async IO, the only change necessary would be to change > > prw_open to open an async handle, and pread/pwrite to wait for the > > result if the current I/O is NOT async. It may be necessary to add a > > parameter or two to the pread/pwrite fhandler methods, but all the rest > > of the functionality could be in the callers. > > I see what you're suggesting; seems sly in a nice way :). > > A small part I'm missing is in interfacing to the layer above this. Are the > aio_* functions supposed to be implemented as "real" syscalls (in > syscalls.cc)? Or should they be implemented in their own aio.cc (which is > where I have them ATM) and call pread()/pwrite() to do their dirty work? > I'm unsure how "central" a syscall has to be to merit syscalls.cc location. syscalls.cc is historical. Cygwin has grown over a single file to keep "syscalls" anyway, so having the interfaces in an aio.cc file doesn't hurt. > Regardless of which file the code is in, I was thinking I should copy > syscalls.cc's pread() contents into aio_read(), for example, to start with. > Then add extra param(s) as needed to the fhandler method call as you > suggested. That's definitely ok. When I was talking about pread/pwrite in our preliminary discussion on cygwin-patches, I was always talking about the fhandler_disk_file::pread and fhandler_disk_file::pwrite methods in fact, not the syscalls of the same name. I'm sorry I was unclear there :} > The problem with having aio_read() call pread() directly is how to tell > pread() we want an async read. That's why I was suggesting O_ASYNC > previously, though I now understand that's the wrong direction to go. What > is the correct direction? Looks like you're on the right track, just go ahead. We can fix the finer details later. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
Attachment:
signature.asc
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |