[PATCH 4/5] server: Added server side mamed pipe read and write implementation and use it for message mode pipes.

Sebastian Lackner sebastian at fds-team.de
Mon Feb 27 12:42:42 CST 2017


On 22.02.2017 14:51, Jacek Caban wrote:
> Signed-off-by: Jacek Caban <jacek at 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.




More information about the wine-devel mailing list