summaryrefslogtreecommitdiff
path: root/include/my_pthread.h
diff options
context:
space:
mode:
authorserg@serg.mylan <>2005-02-14 21:50:09 +0100
committerserg@serg.mylan <>2005-02-14 21:50:09 +0100
commitfd828e5b4d7f20a64bccfc25a096ca94760bcec9 (patch)
treeea9dd08a255018554104b4f137dea7cfe36ece0a /include/my_pthread.h
parent2b49bea59a594a0f4a87200adca21fb0cc3b2893 (diff)
parentdb13afd89db4a415e2a77b0c200a1391ea2f03fe (diff)
downloadmariadb-git-fd828e5b4d7f20a64bccfc25a096ca94760bcec9.tar.gz
manually merged
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r--include/my_pthread.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 8e5d2aa0e01..b170753913b 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -689,12 +689,12 @@ 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)))
-#if defined (__GNUC__) || defined (__cplusplus)
-static inline bool thread_safe_dec_and_test(ulong V, pthread_mutex_t *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--;
+ res=--V;
pthread_mutex_unlock(L);
return res==0;
}