summaryrefslogtreecommitdiff
path: root/include/my_pthread.h
diff options
context:
space:
mode:
authorserg@serg.mylan <>2005-04-05 13:17:49 +0200
committerserg@serg.mylan <>2005-04-05 13:17:49 +0200
commit810b2c3d4059d0a03c1fcf48a9823db8a5dd5c6c (patch)
treea9dd96a05ad4e0e84d0b4f7711b882492d5ea59d /include/my_pthread.h
parent2b8ff6949f5f9abe83aa308e2e942ac4c6ed6f4b (diff)
downloadmariadb-git-810b2c3d4059d0a03c1fcf48a9823db8a5dd5c6c.tar.gz
remove the rest of isam/merge references
fix a race condition in TC_LOG_BINLOG::unlog
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r--include/my_pthread.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index b170753913b..670a4ccf63e 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -678,7 +678,6 @@ extern pthread_t shutdown_th, main_th, signal_th;
#ifdef HAVE_ATOMIC_ADD
#define thread_safe_increment(V,L) atomic_inc((atomic_t*) &V)
#define thread_safe_decrement(V,L) atomic_dec((atomic_t*) &V)
-#define thread_safe_dec_and_test(V, L) atomic_dec_and_test((atomic_t*) &V)
#define thread_safe_add(V,C,L) atomic_add((C),(atomic_t*) &V)
#define thread_safe_sub(V,C,L) atomic_sub((C),(atomic_t*) &V)
#else
@@ -689,22 +688,6 @@ extern pthread_t shutdown_th, main_th, signal_th;
#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
#define thread_safe_sub(V,C,L) \
(pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
-#ifdef __cplusplus
-static inline bool thread_safe_dec_and_test(ulong &V, pthread_mutex_t *L)
-{
- ulong res;
- pthread_mutex_lock(L);
- res=--V;
- pthread_mutex_unlock(L);
- return res==0;
-}
-#else
-/*
- what should we do ? define it as static ?
- a regular function somewhere in mysys/ ?
- for now it's only used in c++ code, so there's no need to bother
-*/
-#endif
#endif /* HAVE_ATOMIC_ADD */
#ifdef SAFE_STATISTICS
#define statistic_increment(V,L) thread_safe_increment((V),(L))