From dbe7694c533ce8bc454248255a2abad66f221e01 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 15 Apr 2020 14:55:30 +0200 Subject: [PATCH] server: Get rid of no longer needed get_suspend_context and set_suspend_context requests. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- include/wine/server_protocol.h | 34 +---------------------- server/protocol.def | 13 --------- server/request.h | 7 ----- server/thread.c | 49 ---------------------------------- server/trace.c | 20 -------------- 5 files changed, 1 insertion(+), 122 deletions(-) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 77f62afb72f..ba43aa07edd 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -5657,32 +5657,6 @@ struct update_rawinput_devices_reply -struct get_suspend_context_request -{ - struct request_header __header; - char __pad_12[4]; -}; -struct get_suspend_context_reply -{ - struct reply_header __header; - /* VARARG(context,context); */ -}; - - - -struct set_suspend_context_request -{ - struct request_header __header; - /* VARARG(context,context); */ - char __pad_12[4]; -}; -struct set_suspend_context_reply -{ - struct reply_header __header; -}; - - - struct create_job_request { struct request_header __header; @@ -6097,8 +6071,6 @@ enum request REQ_free_user_handle, REQ_set_cursor, REQ_update_rawinput_devices, - REQ_get_suspend_context, - REQ_set_suspend_context, REQ_create_job, REQ_open_job, REQ_assign_job, @@ -6401,8 +6373,6 @@ union generic_request struct free_user_handle_request free_user_handle_request; struct set_cursor_request set_cursor_request; struct update_rawinput_devices_request update_rawinput_devices_request; - struct get_suspend_context_request get_suspend_context_request; - struct set_suspend_context_request set_suspend_context_request; struct create_job_request create_job_request; struct open_job_request open_job_request; struct assign_job_request assign_job_request; @@ -6703,8 +6673,6 @@ union generic_reply struct free_user_handle_reply free_user_handle_reply; struct set_cursor_reply set_cursor_reply; struct update_rawinput_devices_reply update_rawinput_devices_reply; - struct get_suspend_context_reply get_suspend_context_reply; - struct set_suspend_context_reply set_suspend_context_reply; struct create_job_reply create_job_reply; struct open_job_reply open_job_reply; struct assign_job_reply assign_job_reply; @@ -6718,7 +6686,7 @@ union generic_reply /* ### protocol_version begin ### */ -#define SERVER_PROTOCOL_VERSION 599 +#define SERVER_PROTOCOL_VERSION 600 /* ### protocol_version end ### */ diff --git a/server/protocol.def b/server/protocol.def index 318c3b0b839..7b92ffd374e 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -3889,19 +3889,6 @@ struct handle_info @END -/* Retrieve the suspended context of a thread */ -@REQ(get_suspend_context) -@REPLY - VARARG(context,context); /* thread context */ -@END - - -/* Store the suspend context of a thread */ -@REQ(set_suspend_context) - VARARG(context,context); /* thread context */ -@END - - /* Create a new job object */ @REQ(create_job) unsigned int access; /* wanted access rights */ diff --git a/server/request.h b/server/request.h index c1f4fc6b395..dff5edc893e 100644 --- a/server/request.h +++ b/server/request.h @@ -405,8 +405,6 @@ DECL_HANDLER(alloc_user_handle); DECL_HANDLER(free_user_handle); DECL_HANDLER(set_cursor); DECL_HANDLER(update_rawinput_devices); -DECL_HANDLER(get_suspend_context); -DECL_HANDLER(set_suspend_context); DECL_HANDLER(create_job); DECL_HANDLER(open_job); DECL_HANDLER(assign_job); @@ -708,8 +706,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] = (req_handler)req_free_user_handle, (req_handler)req_set_cursor, (req_handler)req_update_rawinput_devices, - (req_handler)req_get_suspend_context, - (req_handler)req_set_suspend_context, (req_handler)req_create_job, (req_handler)req_open_job, (req_handler)req_assign_job, @@ -2420,9 +2416,6 @@ C_ASSERT( FIELD_OFFSET(struct set_cursor_reply, new_clip) == 32 ); C_ASSERT( FIELD_OFFSET(struct set_cursor_reply, last_change) == 48 ); C_ASSERT( sizeof(struct set_cursor_reply) == 56 ); C_ASSERT( sizeof(struct update_rawinput_devices_request) == 16 ); -C_ASSERT( sizeof(struct get_suspend_context_request) == 16 ); -C_ASSERT( sizeof(struct get_suspend_context_reply) == 8 ); -C_ASSERT( sizeof(struct set_suspend_context_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct create_job_request, access) == 12 ); C_ASSERT( sizeof(struct create_job_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct create_job_reply, handle) == 8 ); diff --git a/server/thread.c b/server/thread.c index b93e91cefd5..762ddb35806 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1836,55 +1836,6 @@ DECL_HANDLER(set_thread_context) release_object( thread ); } -/* retrieve the suspended context of a thread */ -DECL_HANDLER(get_suspend_context) -{ - if (get_reply_max_size() < sizeof(context_t)) - { - set_error( STATUS_INVALID_PARAMETER ); - return; - } - - if (current->suspend_context) - { - if (current->suspend_context->flags) - set_reply_data_ptr( current->suspend_context, sizeof(context_t) ); - else - free( current->suspend_context ); - if (current->context == current->suspend_context) - { - current->context = NULL; - stop_thread_if_suspended( current ); - } - current->suspend_context = NULL; - } - else set_error( STATUS_INVALID_PARAMETER ); /* not suspended, shouldn't happen */ -} - -/* store the suspended context of a thread */ -DECL_HANDLER(set_suspend_context) -{ - const context_t *context = get_req_data(); - - if (get_req_data_size() < sizeof(context_t)) - { - set_error( STATUS_INVALID_PARAMETER ); - return; - } - - if (current->context || context->cpu != current->process->cpu) - { - /* nested suspend or exception, shouldn't happen */ - set_error( STATUS_INVALID_PARAMETER ); - } - else if ((current->suspend_context = mem_alloc( sizeof(context_t) ))) - { - memcpy( current->suspend_context, get_req_data(), sizeof(context_t) ); - current->suspend_context->flags = 0; /* to keep track of what is modified */ - current->context = current->suspend_context; - } -} - /* fetch a selector entry for a thread */ DECL_HANDLER(get_selector_entry) { diff --git a/server/trace.c b/server/trace.c index 9dd7ab73a13..e762cd56a08 100644 --- a/server/trace.c +++ b/server/trace.c @@ -4537,20 +4537,6 @@ static void dump_update_rawinput_devices_request( const struct update_rawinput_d dump_varargs_rawinput_devices( " devices=", cur_size ); } -static void dump_get_suspend_context_request( const struct get_suspend_context_request *req ) -{ -} - -static void dump_get_suspend_context_reply( const struct get_suspend_context_reply *req ) -{ - dump_varargs_context( " context=", cur_size ); -} - -static void dump_set_suspend_context_request( const struct set_suspend_context_request *req ) -{ - dump_varargs_context( " context=", cur_size ); -} - static void dump_create_job_request( const struct create_job_request *req ) { fprintf( stderr, " access=%08x", req->access ); @@ -4903,8 +4889,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = { (dump_func)dump_free_user_handle_request, (dump_func)dump_set_cursor_request, (dump_func)dump_update_rawinput_devices_request, - (dump_func)dump_get_suspend_context_request, - (dump_func)dump_set_suspend_context_request, (dump_func)dump_create_job_request, (dump_func)dump_open_job_request, (dump_func)dump_assign_job_request, @@ -5203,8 +5187,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = { NULL, (dump_func)dump_set_cursor_reply, NULL, - (dump_func)dump_get_suspend_context_reply, - NULL, (dump_func)dump_create_job_reply, (dump_func)dump_open_job_reply, NULL, @@ -5503,8 +5485,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = { "free_user_handle", "set_cursor", "update_rawinput_devices", - "get_suspend_context", - "set_suspend_context", "create_job", "open_job", "assign_job",