mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
restored run-time thread lib detection
sql/stacktrace.c: removed code duplication sql/stacktrace.h: removed code duplication
This commit is contained in:
@ -55,19 +55,6 @@ void safe_print_str(const char* name, const char* val, int max_len)
|
||||
|
||||
static my_bool is_nptl;
|
||||
|
||||
/* Check if we are using NPTL or LinuxThreads on Linux */
|
||||
void check_thread_lib(void)
|
||||
{
|
||||
char buf[5];
|
||||
|
||||
#ifdef _CS_GNU_LIBPTHREAD_VERSION
|
||||
confstr(_CS_GNU_LIBPTHREAD_VERSION, buf, sizeof(buf));
|
||||
is_nptl = !strncasecmp(buf, "NPTL", sizeof(buf));
|
||||
#else
|
||||
is_nptl = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__alpha__) && defined(__GNUC__)
|
||||
/*
|
||||
The only way to backtrace without a symbol table on alpha
|
||||
@ -173,8 +160,8 @@ terribly wrong...\n");
|
||||
#endif /* __alpha__ */
|
||||
|
||||
/* We are 1 frame above signal frame with NPTL and 2 frames above with LT */
|
||||
sigreturn_frame_count = is_nptl ? 1 : 2;
|
||||
|
||||
sigreturn_frame_count = thd_lib_detected == THD_LIB_LT ? 2 : 1;
|
||||
|
||||
while (fp < (uchar**) stack_bottom)
|
||||
{
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
|
Reference in New Issue
Block a user