POSIX Asynchronous I/O support: fhandler files

This code is where the AIO implementation is wired into existing Cygwin
mechanisms for file and device I/O: the fhandler* functions.  It makes
use of an existing internal routine prw_open to supply a "shadow fd"
that permits asynchronous operations on a file the user app accesses
via its own fd.  This allows AIO to read or write at arbitrary locations
within a file without disturbing the app's file pointer.  (This was
already the case with normal pread|pwrite; we're just adding "async"
to the mix.)
This commit is contained in:
Mark Geisert
2018-07-23 22:31:58 -07:00
committed by Corinna Vinschen
parent a9ffa71a15
commit 87253cbe38
4 changed files with 83 additions and 34 deletions

View File

@@ -1097,14 +1097,14 @@ fhandler_base::lseek (off_t offset, int whence)
}
ssize_t __reg3
fhandler_base::pread (void *, size_t, off_t)
fhandler_base::pread (void *, size_t, off_t, void *)
{
set_errno (ESPIPE);
return -1;
}
ssize_t __reg3
fhandler_base::pwrite (void *, size_t, off_t)
fhandler_base::pwrite (void *, size_t, off_t, void *)
{
set_errno (ESPIPE);
return -1;