Remove unnecessary code

A descriptor is always added to the global epoll instance or
to a specific worker, never just to _any_ worker.
This commit is contained in:
Johan Wikman
2018-02-28 20:11:27 +02:00
parent e385e6fcd4
commit a197e6c859
2 changed files with 1 additions and 13 deletions

View File

@ -40,7 +40,6 @@
using maxscale::Worker;
static int next_epoll_fd = 0; /*< Which thread handles the next DCB */
static int n_threads; /*< Number of threads */
/**
@ -100,13 +99,7 @@ bool poll_add_fd_to_worker(int wid, int fd, uint32_t events, MXS_POLL_DATA* data
{
bool rv;
if (wid == MXS_WORKER_ANY)
{
wid = (int)atomic_add(&next_epoll_fd, 1) % n_threads;
rv = add_fd_to_worker(wid, fd, events, data);
}
else if (wid == MXS_WORKER_ALL)
if (wid == MXS_WORKER_ALL)
{
rv = add_fd_to_workers(fd, events, data);
}