diff options
author | Vladislav Vaintroub <vvaintroub@linux-rbsx> | 2009-12-19 03:21:49 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@linux-rbsx> | 2009-12-19 03:21:49 +0100 |
commit | 106bb1652ed8918ee580e0aa83d59bf46053f7e9 (patch) | |
tree | 9ccfada701764a2476975250d029acbe812b12b1 /include/my_pthread.h | |
parent | 27c0d595e9e3a35232672209219ecc9b74004ab4 (diff) | |
parent | 4e8d1c6bf30abfd45a993b058ff2a33d4671b73d (diff) | |
download | mariadb-git-106bb1652ed8918ee580e0aa83d59bf46053f7e9.tar.gz |
merge
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r-- | include/my_pthread.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index 6e3763b6181..51dd9c72c79 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -608,6 +608,8 @@ extern pthread_mutexattr_t my_errorcheck_mutexattr; typedef ulong my_thread_id; extern my_bool my_thread_global_init(void); +extern my_bool my_thread_basic_global_init(void); +extern void my_thread_basic_global_reinit(void); extern void my_thread_global_end(void); extern my_bool my_thread_init(void); extern void my_thread_end(void); @@ -638,10 +640,10 @@ extern int pthread_dummy(int); struct st_my_thread_var { int thr_errno; - pthread_cond_t suspend; - pthread_mutex_t mutex; - pthread_mutex_t * volatile current_mutex; - pthread_cond_t * volatile current_cond; + mysql_cond_t suspend; + mysql_mutex_t mutex; + mysql_mutex_t * volatile current_mutex; + mysql_cond_t * volatile current_cond; pthread_t pthread_self; my_thread_id id; int cmp_length; @@ -694,9 +696,9 @@ extern uint thd_lib_detected; #define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V)) #else #define thread_safe_increment(V,L) \ - (pthread_mutex_lock((L)), (V)++, pthread_mutex_unlock((L))) + (mysql_mutex_lock((L)), (V)++, mysql_mutex_unlock((L))) #define thread_safe_decrement(V,L) \ - (pthread_mutex_lock((L)), (V)--, pthread_mutex_unlock((L))) + (mysql_mutex_lock((L)), (V)--, mysql_mutex_unlock((L))) #endif #endif @@ -706,9 +708,9 @@ extern uint thd_lib_detected; #define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C)) #else #define thread_safe_add(V,C,L) \ - (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L))) + (mysql_mutex_lock((L)), (V)+=(C), mysql_mutex_unlock((L))) #define thread_safe_sub(V,C,L) \ - (pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L))) + (mysql_mutex_lock((L)), (V)-=(C), mysql_mutex_unlock((L))) #endif #endif #endif |