REORG: mworker: move struct mworker_proc to global.h
Move the definition of the mworker_proc structure in types/global.h.
diff --git a/include/types/global.h b/include/types/global.h
index 5262867..201a18a 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -202,6 +202,17 @@
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 5cce573..d5c55e1 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -212,18 +212,8 @@
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;