From 7e1299bb3af2e640b6186c5be3983ca4350892d7 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Fri, 26 Oct 2018 14:47:31 +0200 Subject: [PATCH] REORG: mworker: move struct mworker_proc to global.h Move the definition of the mworker_proc structure in types/global.h. --- include/types/global.h | 11 +++++++++++ src/haproxy.c | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/types/global.h b/include/types/global.h index 5262867df..201a18a15 100644 --- a/include/types/global.h +++ b/include/types/global.h @@ -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 */ diff --git a/src/haproxy.c b/src/haproxy.c index 5cce57343..d5c55e172 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -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;