On 22.02.2017 14:51, Jacek Caban wrote:
Signed-off-by: Jacek Caban jacek@codeweavers.com
dlls/kernel32/tests/pipe.c | 28 ++- dlls/ntdll/file.c | 7 +- dlls/ntdll/tests/file.c | 2 +- server/async.c | 9 + server/file.h | 1 + server/named_pipe.c | 446 ++++++++++++++++++++++++++++++++++++++++++--- 6 files changed, 447 insertions(+), 46 deletions(-)
As I see this updated patchset allows to return the result immediately, but still uses a USR1 signal to transfer back the IO completion info. Wouldn't it be useful to get rid of that aswell?
Also please note that we need to distinguish "immediate returns" and "async returns" to properly implement FileIoCompletionNotificationInformation. This especially means that waiting internally is not an option.
- iosb = async_get_iosb( async );
- if ((blocking || iosb->status != STATUS_PENDING)
&& !(handle = alloc_handle( current->process, async, SYNCHRONIZE, 0 )))
async_terminate( async, get_error() );
I don't think this will work as expected. async_terminate might queue an APC, but the caller will immediately deallocate the async struct in server_write_file because status != STATUS_PENDING.