From e040e6c4f8dd20b7b52d843aefe1d6a6c5c0047d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 23 Jun 2006 12:27:45 +0200 Subject: [PATCH] libwine: Added entry for sigprocmask in the pthread functions table. --- dlls/ntdll/server.c | 8 ++++---- include/wine/pthread.h | 3 +++ loader/kthread.c | 3 ++- loader/pthread.c | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index cffc407d6cd..b10a391019b 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -159,7 +159,7 @@ void server_exit_thread( int status ) NtFreeVirtualMemory( GetCurrentProcess(), &info.teb_base, &size, MEM_RELEASE | MEM_SYSTEM ); info.teb_size = size; - sigprocmask( SIG_BLOCK, &block_set, NULL ); + pthread_functions.sigprocmask( SIG_BLOCK, &block_set, NULL ); close( ntdll_get_thread_data()->wait_fd[0] ); close( ntdll_get_thread_data()->wait_fd[1] ); close( ntdll_get_thread_data()->reply_fd ); @@ -173,7 +173,7 @@ void server_exit_thread( int status ) */ void server_abort_thread( int status ) { - sigprocmask( SIG_BLOCK, &block_set, NULL ); + pthread_functions.sigprocmask( SIG_BLOCK, &block_set, NULL ); close( ntdll_get_thread_data()->wait_fd[0] ); close( ntdll_get_thread_data()->wait_fd[1] ); close( ntdll_get_thread_data()->reply_fd ); @@ -312,10 +312,10 @@ unsigned int wine_server_call( void *req_ptr ) struct __server_request_info * const req = req_ptr; sigset_t old_set; - sigprocmask( SIG_BLOCK, &block_set, &old_set ); + pthread_functions.sigprocmask( SIG_BLOCK, &block_set, &old_set ); send_request( req ); wait_reply( req ); - sigprocmask( SIG_SETMASK, &old_set, NULL ); + pthread_functions.sigprocmask( SIG_SETMASK, &old_set, NULL ); return req->u.reply.reply_header.error; } diff --git a/include/wine/pthread.h b/include/wine/pthread.h index 3d62d9de51a..69a1562634f 100644 --- a/include/wine/pthread.h +++ b/include/wine/pthread.h @@ -23,6 +23,8 @@ struct wine_pthread_callbacks; +#include + #ifdef HAVE_PTHREAD_H #define _GNU_SOURCE @@ -99,6 +101,7 @@ struct wine_pthread_functions void (*exit_thread)( struct wine_pthread_thread_info *info ); void (*abort_thread)( long status ); #endif + int (*sigprocmask)( int how, const sigset_t *newset, sigset_t *oldset ); }; extern void wine_pthread_get_functions( struct wine_pthread_functions *functions, size_t size ); diff --git a/loader/kthread.c b/loader/kthread.c index 4320e80c3a6..a012aadbd79 100644 --- a/loader/kthread.c +++ b/loader/kthread.c @@ -397,7 +397,8 @@ const struct wine_pthread_functions pthread_functions = init_current_teb, get_current_teb, exit_thread, - abort_thread + abort_thread, + sigprocmask }; diff --git a/loader/pthread.c b/loader/pthread.c index 5c6632d49f3..b7487a0b9c8 100644 --- a/loader/pthread.c +++ b/loader/pthread.c @@ -184,7 +184,8 @@ const struct wine_pthread_functions pthread_functions = init_current_teb, get_current_teb, exit_thread, - abort_thread + abort_thread, + pthread_sigmask }; #endif /* HAVE_PTHREAD_H */ -- 2.11.4.GIT