diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-12-17 23:02:52 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-12-17 23:02:52 +0300 |
commit | 6e5c7b80bd178ebd4cab0ca03549186de6f9fbc2 (patch) | |
tree | 4a2290cb7f9ba65d264395cea1348ad6251496fb /include/my_pthread.h | |
parent | 0e3a80e0a851822112226e5e792320389aa0f2ae (diff) | |
parent | 4e8d1c6bf30abfd45a993b058ff2a33d4671b73d (diff) | |
download | mariadb-git-6e5c7b80bd178ebd4cab0ca03549186de6f9fbc2.tar.gz |
Manual merge from mysql-next-mr.
Conflicts:
- mysys/charset.c
- mysys/my_thr_init.c
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r-- | include/my_pthread.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index fffb9b0989b..2558f8d5986 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -154,8 +154,6 @@ int pthread_join(pthread_t thread, void **value_ptr); #define pthread_detach_this_thread() #define pthread_condattr_init(A) #define pthread_condattr_destroy(A) -#define pthread_yield() SwitchToThread() - /* per the platform's documentation */ #define pthread_yield() Sleep(0) @@ -617,6 +615,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); @@ -647,10 +647,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; @@ -702,16 +702,16 @@ extern uint thd_lib_detected; #ifdef THREAD #ifndef thread_safe_increment #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 #ifndef thread_safe_add #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 |