MXS_WORKER passed to poll_waitevents

This commit is contained in:
Johan Wikman
2017-02-16 13:00:44 +02:00
parent 016ed89b3e
commit ab37333ce5
4 changed files with 20 additions and 4 deletions

View File

@ -32,6 +32,7 @@
#include <maxscale/log_manager.h>
#include <maxscale/platform.h>
#include <maxscale/query_classifier.h>
#include <maxscale/worker.h>
#include <maxscale/resultset.h>
#include <maxscale/server.h>
#include <maxscale/session.h>
@ -552,11 +553,12 @@ poll_resolve_error(int fd, int errornum, int op)
* @param arg The thread ID passed as a void * to satisfy the threading package
*/
void
poll_waitevents(void *arg)
poll_waitevents(MXS_WORKER *worker)
{
current_thread_id = mxs_worker_id(worker);
struct epoll_event events[MAX_EVENTS];
int i, nfds, timeout_bias = 1;
current_thread_id = (intptr_t)arg;
int poll_spins = 0;
int thread_id = current_thread_id;