Move worker thread management to worker

The worker threads are now started by the workers themselves.
This commit is contained in:
Johan Wikman
2017-02-16 12:25:11 +02:00
parent 72977128f7
commit 016ed89b3e
4 changed files with 189 additions and 84 deletions

View File

@ -14,6 +14,7 @@
#include <maxscale/cdefs.h>
#include <maxscale/poll.h>
#include <maxscale/thread.h>
MXS_BEGIN_DECLS
@ -23,6 +24,8 @@ typedef struct mxs_worker
int id; /*< The id of the worker. */
int read_fd; /*< The file descriptor the worked reads from. */
int write_fd; /*< The file descriptor used for sending data to the worker. */
THREAD thread; /*< The thread handle of the worker. */
bool started; /*< Whether the thread has been started or not. */
} MXS_WORKER;
enum mxs_worker_msg_id