From e52a237fe9a8884ce6da18436a4cf50cfd9dbd45 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 3 Jan 2018 18:51:24 +0100 Subject: remove ifdefs around PSI_THREAD_CALL same change as for PSI_TABLE_CALL --- sql/threadpool_common.cc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'sql/threadpool_common.cc') diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc index fb9e61f9a05..e5ac4b49a2a 100644 --- a/sql/threadpool_common.cc +++ b/sql/threadpool_common.cc @@ -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. */ -- cgit v1.2.1