From: Willy Tarreau Date: Thu, 4 Jun 2020 20:59:39 +0000 (+0200) Subject: REORG: include: move queue.h to haproxy/queue{,-t}.h X-Git-Tag: v2.2-dev9~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a55c45470fa0e107c9196d5fc1098504a9b9b1f6;p=thirdparty%2Fhaproxy.git REORG: include: move queue.h to haproxy/queue{,-t}.h Nothing outstanding here. A number of call places were not justified and removed. --- diff --git a/include/haproxy/queue-t.h b/include/haproxy/queue-t.h new file mode 100644 index 0000000000..41022852b6 --- /dev/null +++ b/include/haproxy/queue-t.h @@ -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 +#include + +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: + */ diff --git a/include/proto/queue.h b/include/haproxy/queue.h similarity index 94% rename from include/proto/queue.h rename to include/haproxy/queue.h index cd4c5ca550..bded676613 100644 --- a/include/proto/queue.h +++ b/include/haproxy/queue.h @@ -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 @@ -19,17 +19,16 @@ * 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 #include #include #include - -#include -#include +#include #include +#include 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: diff --git a/include/proto/server.h b/include/proto/server.h index 383e832c41..066faebce4 100644 --- a/include/proto/server.h +++ b/include/proto/server.h @@ -30,10 +30,8 @@ #include #include #include -#include #include -#include #include diff --git a/include/proto/stream.h b/include/proto/stream.h index 59a95f9554..be6fcd29bc 100644 --- a/include/proto/stream.h +++ b/include/proto/stream.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/types/queue.h b/include/types/queue.h deleted file mode 100644 index d2cb0fffbc..0000000000 --- a/include/types/queue.h +++ /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 -#include - -#include - -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: - */ diff --git a/include/types/server.h b/include/types/server.h index 587b069973..dcf5c40cbc 100644 --- a/include/types/server.h +++ b/include/types/server.h @@ -40,7 +40,6 @@ #include #include -#include #include diff --git a/include/types/stream.h b/include/types/stream.h index 8f87ad58d5..550a7ea26d 100644 --- a/include/types/stream.h +++ b/include/types/stream.h @@ -37,11 +37,11 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/src/backend.c b/src/backend.c index 6e6280ac7e..26e36ae41a 100644 --- a/src/backend.c +++ b/src/backend.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,6 @@ #include #include #include -#include #include #include #include diff --git a/src/check.c b/src/check.c index 4e898b036f..1adbf56e25 100644 --- a/src/check.c +++ b/src/check.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -59,7 +60,6 @@ #include #include -#include #include #include #include diff --git a/src/haproxy.c b/src/haproxy.c index d2aebce933..a9e264f374 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -125,7 +125,6 @@ #include #include #include -#include #include #include diff --git a/src/hlua.c b/src/hlua.c index d557777c90..1ab6f5afdb 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -54,7 +54,6 @@ #include #include -#include #include #include diff --git a/src/lb_chash.c b/src/lb_chash.c index 508b90c049..aaaef89582 100644 --- a/src/lb_chash.c +++ b/src/lb_chash.c @@ -18,11 +18,11 @@ #include #include +#include #include #include #include -#include /* Return next tree node after which must still be in the tree, or be * NULL. Lookup wraps around the end to the beginning. If the next node is the diff --git a/src/lb_fas.c b/src/lb_fas.c index 896740682f..fc9ae5182d 100644 --- a/src/lb_fas.c +++ b/src/lb_fas.c @@ -18,10 +18,10 @@ #include #include +#include #include #include -#include /* Remove a server from a tree. It must have previously been dequeued. This diff --git a/src/lb_fwlc.c b/src/lb_fwlc.c index aef9353c82..d7c6953174 100644 --- a/src/lb_fwlc.c +++ b/src/lb_fwlc.c @@ -12,10 +12,10 @@ #include #include +#include #include #include -#include /* Remove a server from a tree. It must have previously been dequeued. This diff --git a/src/lb_fwrr.c b/src/lb_fwrr.c index 72029a6a46..145d09784b 100644 --- a/src/lb_fwrr.c +++ b/src/lb_fwrr.c @@ -12,10 +12,10 @@ #include #include +#include #include #include -#include static inline void fwrr_remove_from_tree(struct server *s); static inline void fwrr_queue_by_weight(struct eb_root *root, struct server *s); diff --git a/src/lb_map.c b/src/lb_map.c index a6d1cf8641..c963180a99 100644 --- a/src/lb_map.c +++ b/src/lb_map.c @@ -13,10 +13,10 @@ #include #include #include +#include #include #include -#include /* this function updates the map according to server 's new state. * diff --git a/src/queue.c b/src/queue.c index 9cdce013a0..ea0b64af73 100644 --- a/src/queue.c +++ b/src/queue.c @@ -73,6 +73,7 @@ s * queue's lock. #include #include #include +#include #include #include #include @@ -81,7 +82,6 @@ s * queue's lock. #include #include -#include #include #include diff --git a/src/server.c b/src/server.c index df90b22401..4751065b7f 100644 --- a/src/server.c +++ b/src/server.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,6 @@ #include #include -#include #include #include #include diff --git a/src/stream.c b/src/stream.c index b73060d32d..45c1bc845b 100644 --- a/src/stream.c +++ b/src/stream.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -55,7 +56,6 @@ #include #include #include -#include #include #include