]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: queue: create a new structure type "queue"
authorWilly Tarreau <w@1wt.eu>
Fri, 18 Jun 2021 07:21:22 +0000 (09:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Jun 2021 16:43:14 +0000 (18:43 +0200)
This structure will be common to proxies and servers and will contain
everything needed to handle their respective queues. For now it's only
a tree head, a length and an index.

include/haproxy/queue-t.h

index 41022852b63cd06e49cf530f764c253fac13f024..4478d6c55624b379e36412b00a8fdd14f47ea64f 100644 (file)
@@ -39,6 +39,12 @@ struct pendconn {
        struct eb32_node node;
 };
 
+struct queue {
+       struct eb_root head;                    /* queued pendconnds */
+       unsigned int idx;                       /* current queuing index */
+       unsigned int length;                    /* number of entries */
+};
+
 #endif /* _HAPROXY_QUEUE_T_H */
 
 /*