MEDIUM: list: Separate "locked" list from regular list.
Instead of using the same type for regular linked lists and "autolocked"
linked lists, use a separate type, "struct mt_list", for the autolocked one,
and introduce a set of macros, similar to the LIST_* macros, with the
MT_ prefix.
When we use the same entry for both regular list and autolocked list, as
is done for the "list" field in struct connection, we know have to explicitely
cast it to struct mt_list when using MT_ macros.
diff --git a/src/haproxy.c b/src/haproxy.c
index cc3da92..ee6dd27 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -231,7 +231,7 @@
struct mworker_proc *proc_self = NULL;
/* list of the temporarily limited listeners because of lack of resource */
-struct list global_listener_queue = LIST_HEAD_INIT(global_listener_queue);
+struct mt_list global_listener_queue = MT_LIST_HEAD_INIT(global_listener_queue);
struct task *global_listener_queue_task;
static struct task *manage_global_listener_queue(struct task *t, void *context, unsigned short state);
@@ -2747,7 +2747,7 @@
{
int next = TICK_ETERNITY;
/* queue is empty, nothing to do */
- if (LIST_ISEMPTY(&global_listener_queue))
+ if (MT_LIST_ISEMPTY(&global_listener_queue))
goto out;
/* If there are still too many concurrent connections, let's wait for