mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
merge
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user