MXS-1775 Move thread main function to maxscale::MonitorInstance

This commit is contained in:
Johan Wikman
2018-05-16 11:09:11 +03:00
parent 3c277f4e5e
commit 1304fd6147
12 changed files with 15 additions and 39 deletions

View File

@ -57,7 +57,7 @@ bool GRMon::start(const MXS_CONFIG_PARAMETER* params)
m_events = config_get_enum(params, "events", mxs_monitor_event_enum_values);
m_thread = 0;
if (thread_start(&m_thread, GRMon::main, this, 0) != NULL)
if (thread_start(&m_thread, &maxscale::MonitorInstance::main, this, 0) != NULL)
{
started = true;
}
@ -65,12 +65,6 @@ bool GRMon::start(const MXS_CONFIG_PARAMETER* params)
return started;
}
void GRMon::main(void* data)
{
GRMon* mon = (GRMon*)data;
mon->main();
}
void GRMon::stop()
{
ss_dassert(m_thread);