REORG: mworker: move struct mworker_proc to global.h

Move the definition of the mworker_proc structure in types/global.h.
This commit is contained in:
William Lallemand 2018-10-26 14:47:31 +02:00 committed by Willy Tarreau
parent ce83b4a5dd
commit 7e1299bb3a
2 changed files with 11 additions and 10 deletions

View File

@ -202,6 +202,17 @@ struct activity {
char __end[0] __attribute__((aligned(64))); // align size to 64.
};
/*
* Structure used to describe the processes in master worker mode
*/
struct mworker_proc {
int pid;
int ipc_fd[2]; /* 0 is master side, 1 is worker side */
int relative_pid;
int reloads;
struct list list;
};
extern struct global global;
extern struct activity activity[MAX_THREADS];
extern int pid; /* current process id */

View File

@ -212,18 +212,8 @@ struct list proc_list = LIST_HEAD_INIT(proc_list);
int master = 0; /* 1 if in master, 0 if in child */
struct mworker_proc {
int pid;
int ipc_fd[2]; /* 0 is master side, 1 is worker side */
int relative_pid;
int reloads;
struct list list;
};
struct mworker_proc *proc_self;
/* list of the temporarily limited listeners because of lack of resource */
struct list global_listener_queue = LIST_HEAD_INIT(global_listener_queue);
struct task *global_listener_queue_task;