diff options
author | unknown <lars/lthalmann@dl145j.mysql.com> | 2007-01-12 12:31:44 +0100 |
---|---|---|
committer | unknown <lars/lthalmann@dl145j.mysql.com> | 2007-01-12 12:31:44 +0100 |
commit | c051858362a00ced70c1fb848386c60795408e0d (patch) | |
tree | 8f05ed2f7b6984f4ca7df8e1eafad42a9d4235e2 /include/my_pthread.h | |
parent | 799f1aba95fc3ed3d0ce419c8df77ad69bc18e57 (diff) | |
parent | bbc8e54ce3eaa67378ddec7b5514f0f3f780f619 (diff) | |
download | mariadb-git-c051858362a00ced70c1fb848386c60795408e0d.tar.gz |
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
client/mysqlbinlog.cc:
Auto merged
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
libmysqld/CMakeLists.txt:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/rpl_row_tabledefs_2myisam.result:
Auto merged
mysql-test/r/rpl_row_tabledefs_3innodb.result:
Auto merged
mysql-test/r/rpl_sp.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysys/my_thr_init.c:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log.h:
Auto merged
sql/log_event.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/rpl_injector.cc:
Auto merged
sql/rpl_injector.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_locale.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
unittest/mysys/my_atomic-t.c:
Auto merged
sql/log_event.cc:
Manual merge main->rpl
sql/mysqld.cc:
Manual merge main->rpl
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 17b7b98da02..65c759aaab7 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -30,8 +30,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 { |