summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <lars/lthalmann@mysql.com/dl145j.mysql.com>2007-01-12 12:22:54 +0100
committerunknown <lars/lthalmann@mysql.com/dl145j.mysql.com>2007-01-12 12:22:54 +0100
commitecc3a61944047d9acb931dde1fd1bd8df25124a1 (patch)
tree4362dc70674fff9e565390211eb5c37f797ee8d2 /include
parent50361d9a44ddce3d0253feba9c658a17b2b0a517 (diff)
parent34a723988edf89da9d543ee90f9472b1bc6fc3de (diff)
downloadmariadb-git-ecc3a61944047d9acb931dde1fd1bd8df25124a1.tar.gz
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge client/mysqlbinlog.cc: Auto merged client/mysqldump.c: Auto merged include/my_pthread.h: Auto merged mysql-test/t/disabled.def: Auto merged mysys/my_thr_init.c: Auto merged sql/item_timefunc.cc: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/mysql_priv.h: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/sp_head.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_locale.cc: Auto merged sql/sql_parse.cc: Auto merged
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 90e1a758915..8f34a6127c3 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