summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <tsmith@siva.hindu.god>2007-01-18 10:06:36 -0700
committerunknown <tsmith@siva.hindu.god>2007-01-18 10:06:36 -0700
commite594d61625b09e50a9fa3bb3d7d666de7e6702b1 (patch)
treeb9862a98b8c3fd2a9f8986b6fe8bf6fd645bd836 /include
parent9a765037043f62cc8dd419517b90d520fedc99dd (diff)
parent8f1593431fe1ee10fa3d19917b236bdab947276b (diff)
downloadmariadb-git-e594d61625b09e50a9fa3bb3d7d666de7e6702b1.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 client/mysqlbinlog.cc: Auto merged include/my_pthread.h: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/mix_innodb_myisam_binlog.test: Auto merged mysql-test/t/sp.test: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_parse.cc: Manual merge
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