1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

build break cleanup

This commit is contained in:
malff/marcsql@weblab.(none)
2007-05-22 16:19:36 -06:00
parent 1edeae9125
commit d82bed47a7
4 changed files with 11 additions and 15 deletions

View File

@@ -722,17 +722,25 @@ extern uint thd_lib_detected;
Warning:
When compiling without threads, this file is not included.
See the *other* declarations of thread_safe_xxx in include/my_global.h
Second warning:
See include/config-win.h, for yet another implementation.
*/
#ifdef THREAD
#ifndef thread_safe_increment
#define thread_safe_increment(V,L) \
(pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L)))
#define thread_safe_decrement(V,L) \
(pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L)))
#endif
#ifndef thread_safe_add
#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)))
#endif
#endif
/*
statistics_xxx functions are for non critical statistic,