summaryrefslogtreecommitdiff
path: root/include/my_pthread.h
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-04-05 13:17:49 +0200
committerunknown <serg@serg.mylan>2005-04-05 13:17:49 +0200
commitcd0a50bf34477bf547cc4a66f0d5d9651574a65b (patch)
treea9dd96a05ad4e0e84d0b4f7711b882492d5ea59d /include/my_pthread.h
parent5dbcb1555fb63618be171b478a1af8a49b3b46ef (diff)
downloadmariadb-git-cd0a50bf34477bf547cc4a66f0d5d9651574a65b.tar.gz
remove the rest of isam/merge references
fix a race condition in TC_LOG_BINLOG::unlog include/Makefile.am: remove the rest of isam/merge references include/config-win.h: unused and abused macro removed include/my_pthread.h: unused and abused macro removed include/my_sys.h: MY_IGNORE_BADFD flag include/mysql_embed.h: remove the rest of isam/merge references mysql-test/r/replace.result: remove the rest of isam/merge references mysql-test/t/replace.test: remove the rest of isam/merge references mysql-test/t/xa.test: comment mysys/my_sync.c: MY_IGNORE_BADFD flag sql/handler.cc: remove the rest of isam/merge references sql/log.cc: fix a race condition in TC_LOG_BINLOG::unlog preparation for binlog group commit sql/mysql_priv.h: remove duplicates sql/mysqld.cc: remove the rest of isam/merge references sql/opt_range.cc: remove the rest of isam/merge references sql/set_var.cc: hide unused variables. simplify sync_binlog code sql/sql_base.cc: remove the rest of isam/merge references sql/sql_class.h: cleanup
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))