Jacek Caban : server: Use no_fd_queue_async for named pipe ends in server I/O mode.
Alexandre Julliard
julliard at winehq.org
Mon Mar 20 17:16:47 CDT 2017
Module: wine
Branch: master
Commit: ae5684479e4936a47036679f3b4badb63d4769b9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ae5684479e4936a47036679f3b4badb63d4769b9
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Mar 15 23:25:42 2017 +0100
server: Use no_fd_queue_async for named pipe ends in server I/O mode.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
server/named_pipe.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 0f6cf3d..8113b18 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -143,6 +143,9 @@ static const struct object_ops named_pipe_ops =
named_pipe_destroy /* destroy */
};
+/* common server and client pipe end functions */
+static void pipe_end_queue_async( struct fd *fd, struct async *async, int type, int count );
+
/* server end functions */
static void pipe_server_dump( struct object *obj, int verbose );
static struct fd *pipe_server_get_fd( struct object *obj );
@@ -183,7 +186,7 @@ static const struct fd_ops pipe_server_fd_ops =
no_fd_write, /* write */
pipe_server_flush, /* flush */
pipe_server_ioctl, /* ioctl */
- default_fd_queue_async, /* queue_async */
+ pipe_end_queue_async, /* queue_async */
default_fd_reselect_async /* reselect_async */
};
@@ -226,7 +229,7 @@ static const struct fd_ops pipe_client_fd_ops =
no_fd_write, /* write */
pipe_client_flush, /* flush */
default_fd_ioctl, /* ioctl */
- default_fd_queue_async, /* queue_async */
+ pipe_end_queue_async, /* queue_async */
default_fd_reselect_async /* reselect_async */
};
@@ -611,6 +614,13 @@ static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async, int b
return 0;
}
+static void pipe_end_queue_async( struct fd *fd, struct async *async, int type, int count )
+{
+ struct pipe_end *pipe_end = get_fd_user( fd );
+ if (use_server_io( pipe_end )) no_fd_queue_async( fd, async, type, count );
+ else default_fd_queue_async( fd, async, type, count );
+}
+
static inline int is_overlapped( unsigned int options )
{
return !(options & (FILE_SYNCHRONOUS_IO_ALERT | FILE_SYNCHRONOUS_IO_NONALERT));
More information about the wine-cvs
mailing list