Module: wine Branch: master Commit: b660aaa9ea3a74c052bd1254939c67ee37f22ea0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b660aaa9ea3a74c052bd125493...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Dec 26 12:19:41 2008 +0100
server: Use the same field for process and thread handle in the queue_apc request.
---
dlls/ntdll/sync.c | 2 +- dlls/ntdll/thread.c | 2 +- include/wine/server_protocol.h | 5 ++--- server/protocol.def | 3 +-- server/thread.c | 10 +++++----- server/trace.c | 3 +-- 6 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index 002bf42..0614eea 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -1032,7 +1032,7 @@ NTSTATUS NTDLL_queue_process_apc( HANDLE process, const apc_call_t *call, apc_re
SERVER_START_REQ( queue_apc ) { - req->process = wine_server_obj_handle( process ); + req->handle = wine_server_obj_handle( process ); req->call = *call; if (!(ret = wine_server_call( req ))) { diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 89d5ce9..b164727 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -747,7 +747,7 @@ NTSTATUS WINAPI NtQueueApcThread( HANDLE handle, PNTAPCFUNC func, ULONG_PTR arg1 NTSTATUS ret; SERVER_START_REQ( queue_apc ) { - req->thread = wine_server_obj_handle( handle ); + req->handle = wine_server_obj_handle( handle ); if (func) { req->call.type = APC_USER; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 103b572..1889947 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -749,8 +749,7 @@ struct unload_dll_reply struct queue_apc_request { struct request_header __header; - obj_handle_t thread; - obj_handle_t process; + obj_handle_t handle; apc_call_t call; }; struct queue_apc_reply @@ -5051,6 +5050,6 @@ union generic_reply struct set_window_layered_info_reply set_window_layered_info_reply; };
-#define SERVER_PROTOCOL_VERSION 354 +#define SERVER_PROTOCOL_VERSION 355
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index ad05b64..a4c154c 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -673,8 +673,7 @@ typedef union
/* Queue an APC for a thread or process */ @REQ(queue_apc) - obj_handle_t thread; /* thread handle */ - obj_handle_t process; /* process handle */ + obj_handle_t handle; /* thread or process handle */ apc_call_t call; /* call arguments */ @REPLY obj_handle_t handle; /* APC handle */ diff --git a/server/thread.c b/server/thread.c index 0c496db..1eeb59f 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1242,7 +1242,7 @@ DECL_HANDLER(queue_apc) { case APC_NONE: case APC_USER: - thread = get_thread_from_handle( req->thread, THREAD_SET_CONTEXT ); + thread = get_thread_from_handle( req->handle, THREAD_SET_CONTEXT ); break; case APC_VIRTUAL_ALLOC: case APC_VIRTUAL_FREE: @@ -1251,13 +1251,13 @@ DECL_HANDLER(queue_apc) case APC_VIRTUAL_LOCK: case APC_VIRTUAL_UNLOCK: case APC_UNMAP_VIEW: - process = get_process_from_handle( req->process, PROCESS_VM_OPERATION ); + process = get_process_from_handle( req->handle, PROCESS_VM_OPERATION ); break; case APC_VIRTUAL_QUERY: - process = get_process_from_handle( req->process, PROCESS_QUERY_INFORMATION ); + process = get_process_from_handle( req->handle, PROCESS_QUERY_INFORMATION ); break; case APC_MAP_VIEW: - process = get_process_from_handle( req->process, PROCESS_VM_OPERATION ); + process = get_process_from_handle( req->handle, PROCESS_VM_OPERATION ); if (process && process != current->process) { /* duplicate the handle into the target process */ @@ -1272,7 +1272,7 @@ DECL_HANDLER(queue_apc) } break; case APC_CREATE_THREAD: - process = get_process_from_handle( req->process, PROCESS_CREATE_THREAD ); + process = get_process_from_handle( req->handle, PROCESS_CREATE_THREAD ); break; default: set_error( STATUS_INVALID_PARAMETER ); diff --git a/server/trace.c b/server/trace.c index 165c83f..5d39293 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1077,8 +1077,7 @@ static void dump_unload_dll_request( const struct unload_dll_request *req )
static void dump_queue_apc_request( const struct queue_apc_request *req ) { - fprintf( stderr, " thread=%04x,", req->thread ); - fprintf( stderr, " process=%04x,", req->process ); + fprintf( stderr, " handle=%04x,", req->handle ); fprintf( stderr, " call=" ); dump_apc_call( &req->call ); }