diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2015-11-19 16:54:45 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2015-11-26 11:34:17 +0400 |
commit | e562b43222621b75516414e4f7b686031b01461a (patch) | |
tree | 2937524706b32ef0cddfb7dff8efee4cf09b9c8e /include/my_pthread.h | |
parent | e4212898a649fc37869e1e678c6172d3c88c6185 (diff) | |
download | mariadb-git-e562b43222621b75516414e4f7b686031b01461a.tar.gz |
MDEV-8111 - remove "fast mutexes"
They aren't faster than normal mutexes. They're disabled by default for years,
so de facto it's dead code, never used.
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r-- | include/my_pthread.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index 374529c573a..b18b9d824a2 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -445,30 +445,10 @@ void safe_mutex_free_deadlock_data(safe_mutex_t *mp); #define safe_mutex_assert_not_owner(mp) do {} while (0) #define safe_mutex_setflags(mp, F) do {} while (0) -#if defined(MY_PTHREAD_FASTMUTEX) -#define my_cond_timedwait(A,B,C) pthread_cond_timedwait((A), &(B)->mutex, (C)) -#define my_cond_wait(A,B) pthread_cond_wait((A), &(B)->mutex) -#else #define my_cond_timedwait(A,B,C) pthread_cond_timedwait((A),(B),(C)) #define my_cond_wait(A,B) pthread_cond_wait((A), (B)) -#endif /* MY_PTHREAD_FASTMUTEX */ #endif /* !SAFE_MUTEX */ -#if defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) -typedef struct st_my_pthread_fastmutex_t -{ - pthread_mutex_t mutex; - uint spins; - uint rng_state; -} my_pthread_fastmutex_t; -void fastmutex_global_init(void); - -int my_pthread_fastmutex_init(my_pthread_fastmutex_t *mp, - const pthread_mutexattr_t *attr); -int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp); - -#endif /* defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX) */ - /* READ-WRITE thread locking */ #if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS) |