Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntdll/unix/server.c | 14 ++++---------- dlls/ntdll/unix/thread.c | 4 ++-- dlls/ntdll/unix/unix_private.h | 3 +-- 3 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index a086d0cb583..1dcd0792072 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -585,8 +585,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO * server_select */ unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT flags, - timeout_t abs_timeout, context_t *context, pthread_mutex_t *mutex, - user_apc_t *user_apc ) + timeout_t abs_timeout, context_t *context, user_apc_t *user_apc ) { unsigned int ret; int cookie; @@ -635,11 +634,6 @@ unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT size = offsetof( select_op_t, signal_and_wait.signal ); } pthread_sigmask( SIG_SETMASK, &old_set, NULL ); - if (mutex) - { - mutex_unlock( mutex ); - mutex = NULL; - } if (signaled) break;
ret = wait_select_reply( &cookie ); @@ -669,7 +663,7 @@ unsigned int server_wait( const select_op_t *select_op, data_size_t size, UINT f abs_timeout -= now.QuadPart; }
- ret = server_select( select_op, size, flags, abs_timeout, NULL, NULL, &apc ); + ret = server_select( select_op, size, flags, abs_timeout, NULL, &apc ); if (ret == STATUS_USER_APC) return invoke_user_apc( NULL, &apc, ret );
/* A test on Windows 2000 shows that Windows always yields during @@ -690,7 +684,7 @@ NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alertable )
if (alertable) { - status = server_select( NULL, 0, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, 0, NULL, NULL, &apc ); + status = server_select( NULL, 0, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, 0, NULL, &apc ); if (status == STATUS_USER_APC) return invoke_user_apc( context, &apc, status ); } return signal_set_full_context( context ); @@ -705,7 +699,7 @@ NTSTATUS WINAPI NtTestAlert(void) user_apc_t apc; NTSTATUS status;
- status = server_select( NULL, 0, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, 0, NULL, NULL, &apc ); + status = server_select( NULL, 0, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, 0, NULL, &apc ); if (status == STATUS_USER_APC) invoke_user_apc( NULL, &apc, STATUS_SUCCESS ); return STATUS_SUCCESS; } diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index 00261edb593..7a32f36920f 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -1440,7 +1440,7 @@ void wait_suspend( CONTEXT *context )
contexts_to_server( server_contexts, context ); /* wait with 0 timeout, will only return once the thread is no longer suspended */ - server_select( NULL, 0, SELECT_INTERRUPTIBLE, 0, server_contexts, NULL, NULL ); + server_select( NULL, 0, SELECT_INTERRUPTIBLE, 0, server_contexts, NULL ); contexts_from_server( context, server_contexts ); errno = saved_errno; } @@ -1489,7 +1489,7 @@ NTSTATUS send_debug_event( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_c
contexts_to_server( server_contexts, context ); server_select( &select_op, offsetof( select_op_t, wait.handles[1] ), SELECT_INTERRUPTIBLE, - TIMEOUT_INFINITE, server_contexts, NULL, NULL ); + TIMEOUT_INFINITE, server_contexts, NULL );
SERVER_START_REQ( get_exception_status ) { diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 9a9f60a1678..963eb248430 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -158,8 +158,7 @@ extern unsigned int server_call_unlocked( void *req_ptr ) DECLSPEC_HIDDEN; extern void server_enter_uninterrupted_section( pthread_mutex_t *mutex, sigset_t *sigset ) DECLSPEC_HIDDEN; extern void server_leave_uninterrupted_section( pthread_mutex_t *mutex, sigset_t *sigset ) DECLSPEC_HIDDEN; extern unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT flags, - timeout_t abs_timeout, context_t *context, pthread_mutex_t *mutex, - user_apc_t *user_apc ) DECLSPEC_HIDDEN; + timeout_t abs_timeout, context_t *context, user_apc_t *user_apc ) DECLSPEC_HIDDEN; extern unsigned int server_wait( const select_op_t *select_op, data_size_t size, UINT flags, const LARGE_INTEGER *timeout ) DECLSPEC_HIDDEN; extern unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *call,