summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-10-26 12:42:58 +0200
committerunknown <monty@narttu.mysql.fi>2003-10-26 12:42:58 +0200
commitdd85b7602660a400f71d16d00bb8c869d4320c7a (patch)
tree30385c12db3781a2a7e755171020fd0d75e7194e /include
parentf081a5413068a1491a25b60e0cee5a6619fbfa1e (diff)
parentcd9b28f0dc804456f19801b75d8a8099dabd05c6 (diff)
downloadmariadb-git-dd85b7602660a400f71d16d00bb8c869d4320c7a.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into narttu.mysql.fi:/my/mysql-4.1
Diffstat (limited to 'include')
-rw-r--r--include/my_pthread.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 424452a9298..82a2bb1accc 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -669,8 +669,6 @@ extern pthread_t shutdown_th, main_th, signal_th;
#define thread_safe_increment(V,L) atomic_add(1,(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);
-#define statistic_increment(V,L) thread_safe_increment((V),(L))
-#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
#else
#define thread_safe_increment(V,L) \
pthread_mutex_lock((L)); (V)++; pthread_mutex_unlock((L));
@@ -678,6 +676,7 @@ extern pthread_t shutdown_th, main_th, signal_th;
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));
+#endif /* HAVE_ATOMIC_ADD */
#ifdef SAFE_STATISTICS
#define statistic_increment(V,L) thread_safe_increment((V),(L))
#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
@@ -685,7 +684,6 @@ extern pthread_t shutdown_th, main_th, signal_th;
#define statistic_increment(V,L) (V)++
#define statistic_add(V,C,L) (V)+=(C)
#endif /* SAFE_STATISTICS */
-#endif /* HAVE_ATOMIC_ADD */
#endif /* thread_safe_increment */
#ifdef __cplusplus