diff options
author | Michael Widenius <monty@askmonty.org> | 2009-02-15 12:58:34 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2009-02-15 12:58:34 +0200 |
commit | a8fdaa6f2c5b2e302bffb069be3475772ca20f48 (patch) | |
tree | b5c9560ec7346f7af6a5904ad344fdbb8020849c /mysys/my_thr_init.c | |
parent | 115efe100dbc1393bce964fa1370e50cfef71d18 (diff) | |
parent | f7a24d72dc7a86341da4634f6d1a71f1ea77000b (diff) | |
download | mariadb-git-a8fdaa6f2c5b2e302bffb069be3475772ca20f48.tar.gz |
Merge with base MySQL 5.1
Contains fixes for test cases
Changed release tag to beta
configure.in:
change release tag to beta
Diffstat (limited to 'mysys/my_thr_init.c')
-rw-r--r-- | mysys/my_thr_init.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index 3f4c4a4d638..252ad9f203e 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -40,12 +40,6 @@ pthread_mutex_t LOCK_localtime_r; #ifndef HAVE_GETHOSTBYNAME_R pthread_mutex_t LOCK_gethostbyname_r; #endif -#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP -pthread_mutexattr_t my_fast_mutexattr; -#endif -#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP -pthread_mutexattr_t my_errorcheck_mutexattr; -#endif #ifdef TARGET_OS_LINUX @@ -124,29 +118,6 @@ my_bool my_thread_global_init(void) if (my_thread_init()) return 1; -#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP - /* - Set mutex type to "fast" a.k.a "adaptive" - - In this case the thread may steal the mutex from some other thread - that is waiting for the same mutex. This will save us some - context switches but may cause a thread to 'starve forever' while - waiting for the mutex (not likely if the code within the mutex is - short). - */ - pthread_mutexattr_init(&my_fast_mutexattr); - pthread_mutexattr_settype(&my_fast_mutexattr, - PTHREAD_MUTEX_ADAPTIVE_NP); -#endif -#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP - /* - Set mutex type to "errorcheck" - */ - pthread_mutexattr_init(&my_errorcheck_mutexattr); - pthread_mutexattr_settype(&my_errorcheck_mutexattr, - PTHREAD_MUTEX_ERRORCHECK); -#endif - /* Mutex uses by mysys */ pthread_mutex_init(&THR_LOCK_open,MY_MUTEX_INIT_FAST); pthread_mutex_init(&THR_LOCK_lock,MY_MUTEX_INIT_FAST); @@ -226,12 +197,6 @@ void my_thread_global_end(void) } pthread_key_delete(THR_KEY_mysys); -#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP - pthread_mutexattr_destroy(&my_fast_mutexattr); -#endif -#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP - pthread_mutexattr_destroy(&my_errorcheck_mutexattr); -#endif if (all_threads_killed) { pthread_mutex_destroy(&THR_LOCK_threads); |