libwine: Added entry for sigprocmask in the pthread functions table.

This commit is contained in:
Alexandre Julliard 2006-06-23 12:27:45 +02:00
parent c6ad0201f4
commit e040e6c4f8
4 changed files with 11 additions and 6 deletions

View File

@ -159,7 +159,7 @@ void server_exit_thread( int status )
NtFreeVirtualMemory( GetCurrentProcess(), &info.teb_base, &size, MEM_RELEASE | MEM_SYSTEM ); NtFreeVirtualMemory( GetCurrentProcess(), &info.teb_base, &size, MEM_RELEASE | MEM_SYSTEM );
info.teb_size = size; 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[0] );
close( ntdll_get_thread_data()->wait_fd[1] ); close( ntdll_get_thread_data()->wait_fd[1] );
close( ntdll_get_thread_data()->reply_fd ); close( ntdll_get_thread_data()->reply_fd );
@ -173,7 +173,7 @@ void server_exit_thread( int status )
*/ */
void server_abort_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[0] );
close( ntdll_get_thread_data()->wait_fd[1] ); close( ntdll_get_thread_data()->wait_fd[1] );
close( ntdll_get_thread_data()->reply_fd ); 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; struct __server_request_info * const req = req_ptr;
sigset_t old_set; sigset_t old_set;
sigprocmask( SIG_BLOCK, &block_set, &old_set ); pthread_functions.sigprocmask( SIG_BLOCK, &block_set, &old_set );
send_request( req ); send_request( req );
wait_reply( 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; return req->u.reply.reply_header.error;
} }

View File

@ -23,6 +23,8 @@
struct wine_pthread_callbacks; struct wine_pthread_callbacks;
#include <signal.h>
#ifdef HAVE_PTHREAD_H #ifdef HAVE_PTHREAD_H
#define _GNU_SOURCE #define _GNU_SOURCE
@ -99,6 +101,7 @@ struct wine_pthread_functions
void (*exit_thread)( struct wine_pthread_thread_info *info ); void (*exit_thread)( struct wine_pthread_thread_info *info );
void (*abort_thread)( long status ); void (*abort_thread)( long status );
#endif #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 ); extern void wine_pthread_get_functions( struct wine_pthread_functions *functions, size_t size );

View File

@ -397,7 +397,8 @@ const struct wine_pthread_functions pthread_functions =
init_current_teb, init_current_teb,
get_current_teb, get_current_teb,
exit_thread, exit_thread,
abort_thread abort_thread,
sigprocmask
}; };

View File

@ -184,7 +184,8 @@ const struct wine_pthread_functions pthread_functions =
init_current_teb, init_current_teb,
get_current_teb, get_current_teb,
exit_thread, exit_thread,
abort_thread abort_thread,
pthread_sigmask
}; };
#endif /* HAVE_PTHREAD_H */ #endif /* HAVE_PTHREAD_H */