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:
committed by
Corinna Vinschen
parent
a9ffa71a15
commit
87253cbe38
@@ -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;
|
||||
|
Reference in New Issue
Block a user