Module: wine Branch: master Commit: aa1580398e4c9eda851d475213e07d865d9238bd URL: http://source.winehq.org/git/wine.git/?a=commit;h=aa1580398e4c9eda851d475213...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Apr 12 13:55:17 2017 +0200
server: Remove no longer needed blocking requests arguments.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/file.c | 18 +++++++----------- include/wine/server_protocol.h | 10 ++++------ server/protocol.def | 4 ---- server/request.h | 6 +----- server/trace.c | 10 +++------- 5 files changed, 15 insertions(+), 33 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 264ad65..fd5a690 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -574,9 +574,8 @@ static NTSTATUS server_read_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE a
SERVER_START_REQ( read ) { - req->blocking = !apc && !event && !apc_context; - req->async = server_async( handle, &async->io, event, apc, apc_context, io ); - req->pos = offset ? offset->QuadPart : 0; + req->async = server_async( handle, &async->io, event, apc, apc_context, io ); + req->pos = offset ? offset->QuadPart : 0; wine_server_set_reply( req, buffer, size ); status = wine_server_call( req ); wait_handle = wine_server_ptr_handle( reply->wait ); @@ -615,9 +614,8 @@ static NTSTATUS server_write_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE
SERVER_START_REQ( write ) { - req->blocking = !apc && !event && !apc_context; - req->async = server_async( handle, &async->io, event, apc, apc_context, io ); - req->pos = offset ? offset->QuadPart : 0; + req->async = server_async( handle, &async->io, event, apc, apc_context, io ); + req->pos = offset ? offset->QuadPart : 0; wine_server_add_data( req, buffer, size ); status = wine_server_call( req ); wait_handle = wine_server_ptr_handle( reply->wait ); @@ -1528,9 +1526,8 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event,
SERVER_START_REQ( ioctl ) { - req->code = code; - req->blocking = !apc && !event && !apc_context; - req->async = server_async( handle, &async->io, event, apc, apc_context, io ); + req->code = code; + req->async = server_async( handle, &async->io, event, apc, apc_context, io ); wine_server_add_data( req, in_buffer, in_size ); if ((code & 3) != METHOD_BUFFERED) wine_server_add_data( req, out_buffer, out_size ); @@ -3414,8 +3411,7 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock { SERVER_START_REQ( flush ) { - req->blocking = 1; /* always blocking */ - req->async = server_async( hFile, NULL, NULL, NULL, NULL, IoStatusBlock ); + req->async = server_async( hFile, NULL, NULL, NULL, NULL, IoStatusBlock ); ret = wine_server_call( req ); hEvent = wine_server_ptr_handle( reply->event ); } diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 6c80dab..bfdf22f 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -1507,7 +1507,7 @@ struct get_directory_cache_entry_reply struct flush_request { struct request_header __header; - int blocking; + char __pad_12[4]; async_data_t async; }; struct flush_reply @@ -3239,7 +3239,7 @@ struct get_async_result_reply struct read_request { struct request_header __header; - int blocking; + char __pad_12[4]; async_data_t async; file_pos_t pos; }; @@ -3256,7 +3256,7 @@ struct read_reply struct write_request { struct request_header __header; - int blocking; + char __pad_12[4]; async_data_t async; file_pos_t pos; /* VARARG(data,bytes); */ @@ -3277,9 +3277,7 @@ struct ioctl_request struct request_header __header; ioctl_code_t code; async_data_t async; - int blocking; /* VARARG(in_data,bytes); */ - char __pad_60[4]; }; struct ioctl_reply { @@ -6409,6 +6407,6 @@ union generic_reply struct terminate_job_reply terminate_job_reply; };
-#define SERVER_PROTOCOL_VERSION 526 +#define SERVER_PROTOCOL_VERSION 527
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index 222ff95..87285a4 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1242,7 +1242,6 @@ enum server_fd_type
/* Flush a file buffers */ @REQ(flush) - int blocking; /* whether it's a blocking flush */ async_data_t async; /* async I/O parameters */ @REPLY obj_handle_t event; /* event set when finished */ @@ -2358,7 +2357,6 @@ enum message_type
/* Perform a read on a file object */ @REQ(read) - int blocking; /* whether it's a blocking read */ async_data_t async; /* async I/O parameters */ file_pos_t pos; /* read position */ @REPLY @@ -2370,7 +2368,6 @@ enum message_type
/* Perform a write on a file object */ @REQ(write) - int blocking; /* whether it's a blocking write */ async_data_t async; /* async I/O parameters */ file_pos_t pos; /* write position */ VARARG(data,bytes); /* write data */ @@ -2385,7 +2382,6 @@ enum message_type @REQ(ioctl) ioctl_code_t code; /* ioctl code */ async_data_t async; /* async I/O parameters */ - int blocking; /* whether it's a blocking ioctl */ VARARG(in_data,bytes); /* ioctl input data */ @REPLY obj_handle_t wait; /* handle to wait on for blocking ioctl */ diff --git a/server/request.h b/server/request.h index cd396ee..41016bd 100644 --- a/server/request.h +++ b/server/request.h @@ -1009,7 +1009,6 @@ C_ASSERT( FIELD_OFFSET(struct get_directory_cache_entry_request, handle) == 12 ) C_ASSERT( sizeof(struct get_directory_cache_entry_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct get_directory_cache_entry_reply, entry) == 8 ); C_ASSERT( sizeof(struct get_directory_cache_entry_reply) == 16 ); -C_ASSERT( FIELD_OFFSET(struct flush_request, blocking) == 12 ); C_ASSERT( FIELD_OFFSET(struct flush_request, async) == 16 ); C_ASSERT( sizeof(struct flush_request) == 56 ); C_ASSERT( FIELD_OFFSET(struct flush_reply, event) == 8 ); @@ -1584,14 +1583,12 @@ C_ASSERT( FIELD_OFFSET(struct get_async_result_request, user_arg) == 16 ); C_ASSERT( sizeof(struct get_async_result_request) == 24 ); C_ASSERT( FIELD_OFFSET(struct get_async_result_reply, size) == 8 ); C_ASSERT( sizeof(struct get_async_result_reply) == 16 ); -C_ASSERT( FIELD_OFFSET(struct read_request, blocking) == 12 ); C_ASSERT( FIELD_OFFSET(struct read_request, async) == 16 ); C_ASSERT( FIELD_OFFSET(struct read_request, pos) == 56 ); C_ASSERT( sizeof(struct read_request) == 64 ); C_ASSERT( FIELD_OFFSET(struct read_reply, wait) == 8 ); C_ASSERT( FIELD_OFFSET(struct read_reply, options) == 12 ); C_ASSERT( sizeof(struct read_reply) == 16 ); -C_ASSERT( FIELD_OFFSET(struct write_request, blocking) == 12 ); C_ASSERT( FIELD_OFFSET(struct write_request, async) == 16 ); C_ASSERT( FIELD_OFFSET(struct write_request, pos) == 56 ); C_ASSERT( sizeof(struct write_request) == 64 ); @@ -1601,8 +1598,7 @@ C_ASSERT( FIELD_OFFSET(struct write_reply, size) == 16 ); C_ASSERT( sizeof(struct write_reply) == 24 ); C_ASSERT( FIELD_OFFSET(struct ioctl_request, code) == 12 ); C_ASSERT( FIELD_OFFSET(struct ioctl_request, async) == 16 ); -C_ASSERT( FIELD_OFFSET(struct ioctl_request, blocking) == 56 ); -C_ASSERT( sizeof(struct ioctl_request) == 64 ); +C_ASSERT( sizeof(struct ioctl_request) == 56 ); C_ASSERT( FIELD_OFFSET(struct ioctl_reply, wait) == 8 ); C_ASSERT( FIELD_OFFSET(struct ioctl_reply, options) == 12 ); C_ASSERT( sizeof(struct ioctl_reply) == 16 ); diff --git a/server/trace.c b/server/trace.c index 5ebd909..fc7fd35 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1776,8 +1776,7 @@ static void dump_get_directory_cache_entry_reply( const struct get_directory_cac
static void dump_flush_request( const struct flush_request *req ) { - fprintf( stderr, " blocking=%d", req->blocking ); - dump_async_data( ", async=", &req->async ); + dump_async_data( " async=", &req->async ); }
static void dump_flush_reply( const struct flush_reply *req ) @@ -2880,8 +2879,7 @@ static void dump_get_async_result_reply( const struct get_async_result_reply *re
static void dump_read_request( const struct read_request *req ) { - fprintf( stderr, " blocking=%d", req->blocking ); - dump_async_data( ", async=", &req->async ); + dump_async_data( " async=", &req->async ); dump_uint64( ", pos=", &req->pos ); }
@@ -2894,8 +2892,7 @@ static void dump_read_reply( const struct read_reply *req )
static void dump_write_request( const struct write_request *req ) { - fprintf( stderr, " blocking=%d", req->blocking ); - dump_async_data( ", async=", &req->async ); + dump_async_data( " async=", &req->async ); dump_uint64( ", pos=", &req->pos ); dump_varargs_bytes( ", data=", cur_size ); } @@ -2911,7 +2908,6 @@ static void dump_ioctl_request( const struct ioctl_request *req ) { dump_ioctl_code( " code=", &req->code ); dump_async_data( ", async=", &req->async ); - fprintf( stderr, ", blocking=%d", req->blocking ); dump_varargs_bytes( ", in_data=", cur_size ); }