summaryrefslogtreecommitdiff
path: root/mysys/my_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_pthread.c')
-rw-r--r--mysys/my_pthread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 49a1ea79f65..09685ba3e12 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -31,6 +31,7 @@
#endif
uint thd_lib_detected;
+uint thr_client_alarm;
#ifndef my_pthread_setprio
void my_pthread_setprio(pthread_t thread_id,int prior)
@@ -338,7 +339,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 */