diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-27 14:24:41 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-04-27 14:24:41 +0300 |
commit | 2e12d471eab9db77473ec80637f8d0d2d03bf69f (patch) | |
tree | eea2f8df98e8ccbd28d59b75706f44330fd4407d /mysys | |
parent | 61c0df94655f2dc3146456e49f3f51610251e79f (diff) | |
parent | c06845d6f04e092b64c105eb6786056cea2ab593 (diff) | |
download | mariadb-git-2e12d471eab9db77473ec80637f8d0d2d03bf69f.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_thr_init.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index b298c7b1bd7..66c2543c51d 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -141,7 +141,7 @@ void my_thread_global_reinit(void) my_thread_destroy_internal_mutex(); my_thread_init_internal_mutex(); - tmp= my_pthread_getspecific(struct st_my_thread_var*, THR_KEY_mysys); + tmp= my_thread_var; DBUG_ASSERT(tmp); my_thread_destory_thr_mutex(tmp); @@ -279,7 +279,7 @@ my_bool my_thread_init(void) fprintf(stderr,"my_thread_init(): pthread_self: %p\n", pthread_self()); #endif - if (my_pthread_getspecific(struct st_my_thread_var *,THR_KEY_mysys)) + if (my_thread_var) { #ifdef EXTRA_DEBUG_THREADS fprintf(stderr,"my_thread_init() called more than once in thread 0x%lx\n", @@ -297,7 +297,7 @@ my_bool my_thread_init(void) error= 1; goto end; } - pthread_setspecific(THR_KEY_mysys,tmp); + set_mysys_var(tmp); tmp->pthread_self= pthread_self(); my_thread_init_thr_mutex(tmp); @@ -334,7 +334,7 @@ end: void my_thread_end(void) { struct st_my_thread_var *tmp; - tmp= my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); + tmp= my_thread_var; #ifdef EXTRA_DEBUG_THREADS fprintf(stderr,"my_thread_end(): tmp: %p pthread_self: %p thread_id: %ld\n", @@ -355,7 +355,7 @@ void my_thread_end(void) as the key is used by DBUG. */ DBUG_POP(); - pthread_setspecific(THR_KEY_mysys,0); + set_mysys_var(NULL); if (tmp && tmp->init) { @@ -439,7 +439,7 @@ extern void **my_thread_var_dbug() struct st_my_thread_var *tmp; if (!my_thread_global_init_done) return NULL; - tmp= my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); + tmp= my_thread_var; return tmp && tmp->init ? &tmp->dbug : 0; } #endif /* DBUG_OFF */ @@ -451,7 +451,7 @@ safe_mutex_t **my_thread_var_mutex_in_use() struct st_my_thread_var *tmp; if (!my_thread_global_init_done) return NULL; - tmp= my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys); + tmp= my_thread_var; return tmp ? &tmp->mutex_in_use : 0; } |