summaryrefslogtreecommitdiff
path: root/mysys/my_thr_init.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-16 18:20:49 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-16 18:20:49 +0300
commit4d094257dbb785d792785e610ab3cdf41eae9b8c (patch)
tree12de711f3f9d8ad9eee9d28cf71e5487f17315d3 /mysys/my_thr_init.c
parent2618c6963c5bf1349c47ce3af6e55213ea9773f4 (diff)
parent74d29a07712a0caf57fca62dacfeb14b110beca4 (diff)
downloadmariadb-git-4d094257dbb785d792785e610ab3cdf41eae9b8c.tar.gz
merge with 3.23.51
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-mysql_fix_extensions.sh: Delete: scripts/mysql_fix_extensions.sh Build-tools/Do-rpm: Auto merged Makefile.am: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged extra/resolve_stack_dump.c: Auto merged include/my_pthread.h: Auto merged include/my_sys.h: Auto merged include/mysqld_error.h: Auto merged innobase/row/row0ins.c: Auto merged innobase/row/row0mysql.c: Auto merged innobase/row/row0sel.c: Auto merged isam/pack_isam.c: Auto merged libmysql/libmysql.c: Auto merged mysql-test/r/func_if.result: Auto merged mysql-test/t/join.test: Auto merged mysys/array.c: Auto merged mysys/charset.c: Auto merged mysys/default.c: Auto merged mysys/hash.c: Auto merged mysys/my_thr_init.c: Auto merged mysys/raid.cc: Auto merged mysql-test/t/type_decimal.test: Auto merged sql/hostname.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_timefunc.h: Auto merged sql/log.cc: Auto merged sql/mini_client.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged strings/Makefile.am: Auto merged
Diffstat (limited to 'mysys/my_thr_init.c')
-rw-r--r--mysys/my_thr_init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 8e6fdbbbec5..f62b8d5cb1a 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -34,6 +34,9 @@ pthread_mutex_t THR_LOCK_malloc,THR_LOCK_open,THR_LOCK_keycache,
#ifndef HAVE_LOCALTIME_R
pthread_mutex_t LOCK_localtime_r;
#endif
+#ifndef HAVE_GETHOSTBYNAME_R
+pthread_mutex_t LOCK_gethostbyname_r;
+#endif
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_t my_fast_mutexattr;
#endif
@@ -77,6 +80,9 @@ my_bool my_thread_global_init(void)
#ifndef HAVE_LOCALTIME_R
pthread_mutex_init(&LOCK_localtime_r,MY_MUTEX_INIT_SLOW);
#endif
+#ifndef HAVE_GETHOSTBYNAME_R
+ pthread_mutex_init(&LOCK_gethostbyname_r,MY_MUTEX_INIT_SLOW);
+#endif
return my_thread_init();
}
@@ -91,6 +97,9 @@ void my_thread_global_end(void)
#ifdef PPTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_errchk_mutexattr);
#endif
+#ifndef HAVE_GETHOSTBYNAME_R
+ pthread_mutex_destroy(&LOCK_gethostbyname_r);
+#endif
}
static long thread_id=0;