summaryrefslogtreecommitdiff
path: root/sql/threadpool_common.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-01-03 18:51:24 +0100
committerAleksey Midenkov <midenok@gmail.com>2018-01-09 14:21:20 +0300
commite52a237fe9a8884ce6da18436a4cf50cfd9dbd45 (patch)
tree39bcab699be37e557b456926f5ce52c9685c60ec /sql/threadpool_common.cc
parente577b5667a3b3c6be030680d62e69ff539b97199 (diff)
downloadmariadb-git-e52a237fe9a8884ce6da18436a4cf50cfd9dbd45.tar.gz
remove ifdefs around PSI_THREAD_CALL
same change as for PSI_TABLE_CALL
Diffstat (limited to 'sql/threadpool_common.cc')
-rw-r--r--sql/threadpool_common.cc16
1 files changed, 4 insertions, 12 deletions
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. */