diff options
author | unknown <lars@black.(none)> | 2006-12-08 23:54:45 +0100 |
---|---|---|
committer | unknown <lars@black.(none)> | 2006-12-08 23:54:45 +0100 |
commit | 56c0eead64932584b6a45aeae6f829887941199e (patch) | |
tree | 09d7720eae620d35491216acda462f0c7393d672 /include/my_pthread.h | |
parent | bbf88111b37ebba9b6573b9e50408a58639d7125 (diff) | |
parent | 6214585cd7aa8a11990473c8b2401dc3a4b3d6d7 (diff) | |
download | mariadb-git-56c0eead64932584b6a45aeae6f829887941199e.tar.gz |
Merge mysql.com:/home/bk/MERGE/mysql-5.0-merge
into mysql.com:/home/bk/MERGE/mysql-5.1-merge
client/mysqlbinlog.cc:
Auto merged
client/mysqldump.c:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/r/rpl_timezone.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/mysqldump.test:
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/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
include/my_pthread.h:
Manual merge
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r-- | include/my_pthread.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index b3d84e70d6a..3fdb665d882 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -31,8 +31,26 @@ extern "C" { #define EXTERNC #endif /* __cplusplus */ -#if defined(__WIN__) +/* + 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__) typedef CRITICAL_SECTION pthread_mutex_t; typedef HANDLE pthread_t; typedef struct thread_attr { |