diff options
author | midipix <writeonce@midipix.org> | 2017-08-14 22:19:28 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2017-08-18 03:04:29 -0400 |
commit | 842d0f7290d2ac08f9e3a149363477274b9b95cd (patch) | |
tree | 0083321c5c29e83734c54e0b7c006710c63a6076 /src/sem/ntapi_sem_ioctl.c | |
parent | 41ce6f4707be1a49abf52b38f96436a0c96ec873 (diff) | |
download | ntapi-842d0f7290d2ac08f9e3a149363477274b9b95cd.tar.bz2 ntapi-842d0f7290d2ac08f9e3a149363477274b9b95cd.tar.xz |
__ntapi_ipc_create_pipe(): refine, change polling strategy.
The canonical way of polling an i/o handle by requesting a zero-byte
read/write operation and then waiting on the event (or apc routine) that
was specified for that i/o operation fails to work on the writing end of
a byte-stream pipe. Specifically, the request completes immediately,
therefore not allowing us to employ it for a controlled poll operation.
Following this patch, the writing end of the pipe is opened with the
NT_FILE_SYNCHRONOUS_IO_ALERT flag set. With this flag set, zero-byte
writes block, which makes them perfectly suitable for a polling operation,
but less so for non-blocking i/o. With some effort, however, the latter
can be achieved and be both robust and reliable.
Diffstat (limited to 'src/sem/ntapi_sem_ioctl.c')
0 files changed, 0 insertions, 0 deletions