]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move queue.h to haproxy/queue{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 20:59:39 +0000 (22:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:58 +0000 (10:18 +0200)
Nothing outstanding here. A number of call places were not justified and
removed.

19 files changed:
include/haproxy/queue-t.h [new file with mode: 0644]
include/haproxy/queue.h [moved from include/proto/queue.h with 94% similarity]
include/proto/server.h
include/proto/stream.h
include/types/queue.h [deleted file]
include/types/server.h
include/types/stream.h
src/backend.c
src/check.c
src/haproxy.c
src/hlua.c
src/lb_chash.c
src/lb_fas.c
src/lb_fwlc.c
src/lb_fwrr.c
src/lb_map.c
src/queue.c
src/server.c
src/stream.c

diff --git a/include/haproxy/queue-t.h b/include/haproxy/queue-t.h
new file mode 100644 (file)
index 0000000..4102285
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * include/haproxy/queue-t.h
+ * This file defines variables and structures needed for queues.
+ *
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _HAPROXY_QUEUE_T_H
+#define _HAPROXY_QUEUE_T_H
+
+#include <import/eb32tree.h>
+#include <haproxy/api-t.h>
+
+struct proxy;
+struct server;
+struct stream;
+
+struct pendconn {
+       int            strm_flags; /* stream flags */
+       unsigned int   queue_idx;  /* value of proxy/server queue_idx at time of enqueue */
+       struct stream *strm;
+       struct proxy  *px;
+       struct server *srv;        /* the server we are waiting for, may be NULL if don't care */
+       struct server *target;     /* the server that was assigned, = srv except if srv==NULL */
+       struct eb32_node node;
+};
+
+#endif /* _HAPROXY_QUEUE_T_H */
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
similarity index 94%
rename from include/proto/queue.h
rename to include/haproxy/queue.h
index cd4c5ca550cf4d2674a173b35a1eee827842dc6a..bded676613f84b8f8d23450f1deeebe349d64e20 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * include/proto/queue.h
+ * include/haproxy/queue.h
  * This file defines everything related to queues.
  *
- * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _PROTO_QUEUE_H
-#define _PROTO_QUEUE_H
+#ifndef _HAPROXY_QUEUE_H
+#define _HAPROXY_QUEUE_H
 
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/pool.h>
 #include <haproxy/proxy-t.h>
-
-#include <types/queue.h>
-#include <types/stream.h>
+#include <haproxy/queue-t.h>
 #include <types/server.h>
+#include <types/stream.h>
 
 extern struct pool_head *pool_head_pendconn;
 
@@ -105,7 +104,7 @@ static inline int queue_limit_offset(int offset)
 }
 
 
-#endif /* _PROTO_QUEUE_H */
+#endif /* _HAPROXY_QUEUE_H */
 
 /*
  * Local variables:
index 383e832c41281390d91f07903cf0fe378db96e53..066faebce4cd184e2cc225d6f8b21d6fd32d5869 100644 (file)
 #include <haproxy/proxy-t.h>
 #include <haproxy/task.h>
 #include <haproxy/time.h>
-#include <types/queue.h>
 #include <types/server.h>
 
-#include <proto/queue.h>
 #include <haproxy/freq_ctr.h>
 
 
index 59a95f9554f8de64753b67963d1ed091316c18ea..be6fcd29bc2ab402775c1f0ba067778d41a64b78 100644 (file)
@@ -29,7 +29,7 @@
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <haproxy/obj_type.h>
-#include <proto/queue.h>
+#include <haproxy/queue.h>
 #include <haproxy/stick_table.h>
 #include <haproxy/task.h>
 #include <haproxy/trace.h>
diff --git a/include/types/queue.h b/include/types/queue.h
deleted file mode 100644 (file)
index d2cb0ff..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-  include/types/queue.h
-  This file defines variables and structures needed for queues.
-
-  Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
-  
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation, version 2.1
-  exclusively.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#ifndef _TYPES_QUEUE_H
-#define _TYPES_QUEUE_H
-
-#include <haproxy/api-t.h>
-#include <haproxy/list-t.h>
-
-#include <types/server.h>
-
-struct stream;
-
-struct pendconn {
-       int            strm_flags; /* stream flags */
-       unsigned int   queue_idx;  /* value of proxy/server queue_idx at time of enqueue */
-       struct stream *strm;
-       struct proxy  *px;
-       struct server *srv;        /* the server we are waiting for, may be NULL if don't care */
-       struct server *target;     /* the server that was assigned, = srv except if srv==NULL */
-       struct eb32_node node;
-};
-
-#endif /* _TYPES_QUEUE_H */
-
-/*
- * Local variables:
- *  c-indent-level: 8
- *  c-basic-offset: 8
- * End:
- */
index 587b0699737e1a76f906d4bec4d0d949bb1d7694..dcf5c40cbc808f14b05fb34bc5da9798e070355e 100644 (file)
@@ -40,7 +40,6 @@
 
 #include <haproxy/connection-t.h>
 #include <haproxy/freq_ctr-t.h>
-#include <types/queue.h>
 #include <haproxy/task-t.h>
 
 
index 8f87ad58d572eacc90658bedbade64d324cb6d95..550a7ea26d3157851a40251c250b6935f0f33018 100644 (file)
 #include <haproxy/list-t.h>
 #include <haproxy/obj_type-t.h>
 #include <haproxy/proxy-t.h>
+#include <haproxy/queue-t.h>
 #include <haproxy/session-t.h>
 #include <haproxy/stream_interface-t.h>
 #include <haproxy/vars-t.h>
 
-#include <types/queue.h>
 #include <types/server.h>
 #include <haproxy/task-t.h>
 #include <haproxy/stick_table-t.h>
index 6e6280ac7eda31daa10cc207cd97b1d0b2117153..26e36ae41af8b25a80db0b2b991e8038b601ba09 100644 (file)
@@ -39,6 +39,7 @@
 #include <haproxy/obj_type.h>
 #include <haproxy/payload.h>
 #include <haproxy/proxy.h>
+#include <haproxy/queue.h>
 #include <haproxy/session.h>
 #include <haproxy/ssl_sock.h>
 #include <haproxy/stream_interface.h>
@@ -52,7 +53,6 @@
 #include <haproxy/arg.h>
 #include <haproxy/protocol.h>
 #include <haproxy/proto_tcp.h>
-#include <proto/queue.h>
 #include <haproxy/sample.h>
 #include <proto/server.h>
 #include <proto/stream.h>
index 4e898b036f17099164f6ad9555ee7926775706f1..1adbf56e254dcbb7bb469760844792100fbc61c8 100644 (file)
@@ -38,6 +38,7 @@
 #include <haproxy/dns.h>
 #include <haproxy/istbuf.h>
 #include <haproxy/list.h>
+#include <haproxy/queue.h>
 #include <haproxy/regex.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
@@ -59,7 +60,6 @@
 
 #include <haproxy/arg.h>
 #include <haproxy/fd.h>
-#include <proto/queue.h>
 #include <haproxy/port_range.h>
 #include <haproxy/proto_tcp.h>
 #include <haproxy/protocol.h>
index d2aebce933db29e2e6f27db9dbc9d569d5a1138c..a9e264f374b89037e63e6a076f6e7719ca414bc8 100644 (file)
 #include <haproxy/arg.h>
 #include <haproxy/fd.h>
 #include <haproxy/protocol.h>
-#include <proto/queue.h>
 #include <proto/server.h>
 #include <proto/stream.h>
 
index d557777c90d59b7b648c6e3ce751086bca3859df..1ab6f5afdbf0ac6cb646d457281b02be2a221261 100644 (file)
@@ -54,7 +54,6 @@
 #include <haproxy/vars.h>
 
 #include <haproxy/arg.h>
-#include <proto/queue.h>
 #include <proto/server.h>
 #include <proto/stream.h>
 
index 508b90c04906da7bba2ee92b4c2f0b906b929001..aaaef89582a923582b17cc0aa84a971c7a875203 100644 (file)
 
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
+#include <haproxy/queue.h>
 #include <haproxy/tools.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-#include <proto/queue.h>
 
 /* Return next tree node after <node> which must still be in the tree, or be
  * NULL. Lookup wraps around the end to the beginning. If the next node is the
index 896740682feba64829f817cfdf7b03b4545bbe86..fc9ae5182df7a7c28f538b23b7fe29bcc987dfbc 100644 (file)
 
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
+#include <haproxy/queue.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-#include <proto/queue.h>
 
 
 /* Remove a server from a tree. It must have previously been dequeued. This
index aef9353c829799a955aa90171f0b2c492145f279..d7c69531747aa42b108074fd7babf28b1a765ffa 100644 (file)
 
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
+#include <haproxy/queue.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-#include <proto/queue.h>
 
 
 /* Remove a server from a tree. It must have previously been dequeued. This
index 72029a6a46cd6973f8e680f226d7e096a8e65cb7..145d09784bc5ed49deb708591ca9065fb5fe0398 100644 (file)
 
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
+#include <haproxy/queue.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-#include <proto/queue.h>
 
 static inline void fwrr_remove_from_tree(struct server *s);
 static inline void fwrr_queue_by_weight(struct eb_root *root, struct server *s);
index a6d1cf8641abafaaaf248b5f15854ca2f7cddf3b..c963180a993ead9014f9402c4617d03efbc17f6c 100644 (file)
 #include <haproxy/backend.h>
 #include <haproxy/api.h>
 #include <haproxy/lb_map.h>
+#include <haproxy/queue.h>
 #include <import/eb32tree.h>
 
 #include <types/server.h>
-#include <proto/queue.h>
 
 /* this function updates the map according to server <srv>'s new state.
  *
index 9cdce013a01f8e7c08f30fca7d4647a8750c6d84..ea0b64af73a6785c1c40ae6dfb2005926d99bcd1 100644 (file)
@@ -73,6 +73,7 @@ s *     queue's lock.
 #include <haproxy/api.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/pool.h>
+#include <haproxy/queue.h>
 #include <haproxy/sample.h>
 #include <haproxy/stream_interface.h>
 #include <haproxy/task.h>
@@ -81,7 +82,6 @@ s *     queue's lock.
 #include <haproxy/thread.h>
 #include <import/eb32tree.h>
 
-#include <proto/queue.h>
 #include <proto/server.h>
 #include <proto/stream.h>
 
index df90b22401a2a05af5c901ab9a5e4a87768f3252..4751065b7f6b7f2fe256533f9986a86e83807ed2 100644 (file)
@@ -28,6 +28,7 @@
 #include <haproxy/errors.h>
 #include <haproxy/global.h>
 #include <haproxy/namespace.h>
+#include <haproxy/queue.h>
 #include <haproxy/sample.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/stream_interface.h>
@@ -36,7 +37,6 @@
 
 #include <haproxy/port_range.h>
 #include <haproxy/protocol.h>
-#include <proto/queue.h>
 #include <proto/server.h>
 #include <proto/stream.h>
 #include <netinet/tcp.h>
index b73060d32d8439975c08fde36937b47a0da63009..45c1bc845bfbe169adf751ac4ef386e120f62b0a 100644 (file)
@@ -42,6 +42,7 @@
 #include <haproxy/log.h>
 #include <haproxy/pool.h>
 #include <haproxy/proxy.h>
+#include <haproxy/queue.h>
 #include <haproxy/session.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/stream_interface.h>
@@ -55,7 +56,6 @@
 #include <haproxy/freq_ctr.h>
 #include <proto/stream.h>
 #include <haproxy/pipe.h>
-#include <proto/queue.h>
 #include <proto/server.h>
 #include <haproxy/stick_table.h>