summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-08-14 22:19:28 +0000
committermidipix <writeonce@midipix.org>2017-08-18 03:04:29 -0400
commit842d0f7290d2ac08f9e3a149363477274b9b95cd (patch)
tree0083321c5c29e83734c54e0b7c006710c63a6076 /include
parent41ce6f4707be1a49abf52b38f96436a0c96ec873 (diff)
downloadntapi-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 'include')
-rw-r--r--include/ntapi/nt_ipc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ntapi/nt_ipc.h b/include/ntapi/nt_ipc.h
index 80760c1..ad5aacd 100644
--- a/include/ntapi/nt_ipc.h
+++ b/include/ntapi/nt_ipc.h
@@ -30,7 +30,7 @@
typedef int32_t __stdcall ntapi_ipc_create_pipe(
__out void ** hpipe_read,
__out void ** hpipe_write,
- __in uint32_t advisory_buffer_size __optional);
+ __in uint32_t advisory_buffer_size);
typedef int32_t __stdcall ntapi_ipc_connect_by_attr(