summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authortsmith@siva.hindu.god <>2007-01-18 10:06:36 -0700
committertsmith@siva.hindu.god <>2007-01-18 10:06:36 -0700
commit244b2004eeac45c514f731ae14880159b0e16807 (patch)
treeb9862a98b8c3fd2a9f8986b6fe8bf6fd645bd836 /include
parent2ae081e041dfe5d7cb60a0663de288d05e4280c4 (diff)
parentd4aa9f0c6227f398aac79682c54717af6398143d (diff)
downloadmariadb-git-244b2004eeac45c514f731ae14880159b0e16807.tar.gz
Merge siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/50
into siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/maint/50
Diffstat (limited to 'include')
-rw-r--r--include/my_pthread.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 0922b3a35f1..52e900b5803 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -30,6 +30,26 @@ extern "C" {
#define EXTERNC
#endif /* __cplusplus */
+/*
+ BUG#24507: Race conditions inside current NPTL pthread_exit() implementation.
+
+ If macro NPTL_PTHREAD_EXIT_HACK is defined then a hack described in the bug
+ report will be implemented inside my_thread_global_init() in my_thr_init.c.
+
+ This amounts to spawning a dummy thread which does nothing but executes
+ pthread_exit(0).
+
+ This bug is fixed in version 2.5 of glibc library.
+
+ TODO: Remove this code when fixed versions of glibc6 are in common use.
+ */
+
+#if defined(TARGET_OS_LINUX) && defined(HAVE_NPTL) && \
+ defined(__GLIBC__) && ( __GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ < 5 )
+#define NPTL_PTHREAD_EXIT_BUG 1
+#endif
+
+
#if defined(__WIN__) || defined(OS2)
#ifdef OS2