diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2007-01-30 18:52:26 +0200 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2007-01-30 18:52:26 +0200 |
commit | cdf6001aeb24d7085ab5f053b31858d95c382e06 (patch) | |
tree | bf4ddf26e334366c90958a67e6d3c8c1ad3c0cd6 /mysys/my_pthread.c | |
parent | 454c763c6be44b34c8e1ff9b8561ab21e717b742 (diff) | |
download | mariadb-git-cdf6001aeb24d7085ab5f053b31858d95c382e06.tar.gz |
Cleanup of thread-type (linuxthread or NTPL) detection code
Move get_thread_lib to mysys/my_pthread.c
Set 'thr_client_alarm' to signal number used by thr_alarm to give alarms
include/my_global.h:
Fixed to be same as in 5.1
include/my_pthread.h:
Move things around to be more in line with rest of code
mysys/default.c:
Fixed two wrong pointer incrementations.
mysys/my_pthread.c:
Cleanup: Use variable thr_client_alarm
mysys/my_thr_init.c:
Detect thread library at startup.
Set also thr_client_alarm signal here, so that we get
it in init_signals() in mysqld
mysys/thr_alarm.c:
Set thr_client_alarm depending on which thread library we are using
sql/mysqld.cc:
Move get_thread_lib to mysys/my_pthread.c
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r-- | mysys/my_pthread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 3eaf27844b2..fd716448e43 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -32,6 +32,7 @@ #endif uint thd_lib_detected; +uint thr_client_alarm; #ifndef my_pthread_setprio void my_pthread_setprio(pthread_t thread_id,int prior) @@ -322,7 +323,9 @@ void *sigwait_thread(void *set_arg) sigaction(i, &sact, (struct sigaction*) 0); } } - sigaddset(set, thd_lib_detected == THD_LIB_LT ? SIGALRM : SIGUSR1); + /* Ensure that init_thr_alarm() is called */ + DBUG_ASSERT(thr_client_alarm); + sigaddset(set, thr_client_alarm); pthread_sigmask(SIG_UNBLOCK,(sigset_t*) set,(sigset_t*) 0); alarm_thread=pthread_self(); /* For thr_alarm */ |