summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/my_pthread.h1
-rw-r--r--mysys/my_pthread.c1
-rw-r--r--mysys/my_thr_init.c5
3 files changed, 7 insertions, 0 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 9d5e78bba44..a336d4dc288 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -683,6 +683,7 @@ extern pthread_t shutdown_th, main_th, signal_th;
#define THD_LIB_LT 4
extern uint thd_lib_detected;
+extern uint thr_client_alarm;
/* statistics_xxx functions are for not essential statistic */
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 19766a2d195..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)
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 51b31f78a1c..5729f27b7a7 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -21,6 +21,7 @@
#include "mysys_priv.h"
#include <m_string.h>
+#include <signal.h>
#ifdef THREAD
#ifdef USE_TLS
@@ -60,6 +61,10 @@ static uint get_thread_lib(void);
my_bool my_thread_global_init(void)
{
thd_lib_detected= get_thread_lib();
+ if (thd_lib_detected == THD_LIB_LT)
+ thr_client_alarm= SIGALRM;
+ else
+ thr_client_alarm= SIGUSR1;
if (pthread_key_create(&THR_KEY_mysys,0))
{