mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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
This commit is contained in:
@@ -28,14 +28,6 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Thread library */
|
||||
|
||||
#define THD_LIB_OTHER 1
|
||||
#define THD_LIB_NPTL 2
|
||||
#define THD_LIB_LT 4
|
||||
|
||||
extern uint thd_lib_detected;
|
||||
|
||||
#if defined(__WIN__) || defined(OS2)
|
||||
|
||||
#ifdef OS2
|
||||
@@ -684,6 +676,15 @@ extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
|
||||
*/
|
||||
extern pthread_t shutdown_th, main_th, signal_th;
|
||||
|
||||
/* Which kind of thread library is in use */
|
||||
|
||||
#define THD_LIB_OTHER 1
|
||||
#define THD_LIB_NPTL 2
|
||||
#define THD_LIB_LT 4
|
||||
|
||||
extern uint thd_lib_detected;
|
||||
extern uint thr_client_alarm;
|
||||
|
||||
/* statistics_xxx functions are for not essential statistic */
|
||||
|
||||
#ifndef thread_safe_increment
|
||||
|
Reference in New Issue
Block a user