mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
remove ifdefs around PSI_THREAD_CALL
same change as for PSI_TABLE_CALL
This commit is contained in:
committed by
Aleksey Midenkov
parent
e577b5667a
commit
e52a237fe9
@ -84,17 +84,13 @@ struct Worker_thread_context
|
||||
|
||||
void save()
|
||||
{
|
||||
#ifdef HAVE_PSI_THREAD_INTERFACE
|
||||
psi_thread = PSI_THREAD_CALL(get_thread)();
|
||||
#endif
|
||||
psi_thread = PSI_CALL_get_thread();
|
||||
mysys_var= (st_my_thread_var *)pthread_getspecific(THR_KEY_mysys);
|
||||
}
|
||||
|
||||
void restore()
|
||||
{
|
||||
#ifdef HAVE_PSI_THREAD_INTERFACE
|
||||
PSI_THREAD_CALL(set_thread)(psi_thread);
|
||||
#endif
|
||||
PSI_CALL_set_thread(psi_thread);
|
||||
pthread_setspecific(THR_KEY_mysys,mysys_var);
|
||||
pthread_setspecific(THR_THD, 0);
|
||||
}
|
||||
@ -144,9 +140,7 @@ static void thread_attach(THD* thd)
|
||||
pthread_setspecific(THR_KEY_mysys,thd->mysys_var);
|
||||
thd->thread_stack=(char*)&thd;
|
||||
thd->store_globals();
|
||||
#ifdef HAVE_PSI_THREAD_INTERFACE
|
||||
PSI_THREAD_CALL(set_thread)(thd->event_scheduler.m_psi);
|
||||
#endif
|
||||
PSI_CALL_set_thread(thd->event_scheduler.m_psi);
|
||||
mysql_socket_set_thread_owner(thd->net.vio->mysql_socket);
|
||||
}
|
||||
|
||||
@ -254,10 +248,8 @@ static THD* threadpool_add_connection(CONNECT *connect, void *scheduler_data)
|
||||
thd->event_scheduler.data= scheduler_data;
|
||||
|
||||
/* Create new PSI thread for use with the THD. */
|
||||
#ifdef HAVE_PSI_THREAD_INTERFACE
|
||||
thd->event_scheduler.m_psi=
|
||||
PSI_THREAD_CALL(new_thread)(key_thread_one_connection, thd, thd->thread_id);
|
||||
#endif
|
||||
PSI_CALL_new_thread(key_thread_one_connection, thd, thd->thread_id);
|
||||
|
||||
|
||||
/* Login. */
|
||||
|
Reference in New Issue
Block a user