]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move task.h to haproxy/task{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 15:25:40 +0000 (17:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:58 +0000 (10:18 +0200)
The TASK_IS_TASKLET() macro was moved to the proto file instead of the
type one. The proto part was a bit reordered to remove a number of ugly
forward declaration of static inline functions. About a tens of C and H
files had their dependency dropped since they were not using anything
from task.h.

48 files changed:
contrib/debug/flags.c
contrib/prometheus-exporter/service-prometheus.c
include/haproxy/dns-t.h
include/haproxy/task-t.h [moved from include/types/task.h with 97% similarity]
include/haproxy/task.h [moved from include/proto/task.h with 98% similarity]
include/proto/applet.h
include/proto/channel.h
include/proto/connection.h
include/proto/proto_tcp.h
include/proto/queue.h
include/proto/signal.h
include/proto/stream.h
include/proto/tcp_rules.h
include/types/checks.h
include/types/server.h
include/types/session.h
include/types/spoe.h
include/types/stream.h
src/action.c
src/applet.c
src/backend.c
src/cfgparse.c
src/checks.c
src/cli.c
src/debug.c
src/dns.c
src/flt_spoe.c
src/frontend.c
src/haproxy.c
src/hlua.c
src/listener.c
src/mux_pt.c
src/peers.c
src/proto_sockpair.c
src/proto_tcp.c
src/proto_uxst.c
src/proxy.c
src/queue.c
src/raw_sock.c
src/server.c
src/signal.c
src/ssl_sock.c
src/stats.c
src/stick_table.c
src/stream.c
src/stream_interface.c
src/task.c
src/tools.c

index f38378f7d90a6801759e87a4403cd04cf92a1c14..2287ee363877d7dd3ba3cf97f5d432092c13576c 100644 (file)
@@ -6,7 +6,7 @@
 #include <types/http_ana.h>
 #include <types/stream.h>
 #include <types/stream_interface.h>
-#include <types/task.h>
+#include <haproxy/task-t.h>
 
 // 1 bit per flag, no hole permitted here
 #define SHOW_AS_ANA   0x00000001
index ed27bc49ea76e492efa4c43421818498e672953a..50dc14f817e9be7d9d7967eeac09ee04023d5608 100644 (file)
@@ -36,7 +36,7 @@
 #include <proto/stats.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
+#include <haproxy/task.h>
 
 /* Prometheus exporter applet states (appctx->st0) */
 enum {
index 54c58ee6c629106238f3d8d130a715191060a465..832016b0ba4ed35da52a669d9f50c9f3dc3cce73 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <types/connection.h>
 #include <haproxy/proto_udp-t.h>
-#include <types/task.h>
+#include <haproxy/task-t.h>
 
 extern struct pool_head *dns_requester_pool;
 
similarity index 97%
rename from include/types/task.h
rename to include/haproxy/task-t.h
index 6515d464a9dbdbcf2a4bb5c23c686cdf7b68be53..11f0cb664b946cdc2f6fa5e1bcaa819147ae443b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/types/task.h
+ * include/haproxy/task-t.h
  * Macros, variables and structures for task management.
  *
  * Copyright (C) 2000-2010 Willy Tarreau - w@1wt.eu
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TYPES_TASK_H
-#define _TYPES_TASK_H
+#ifndef _HAPROXY_TASK_T_H
+#define _HAPROXY_TASK_T_H
 
 #include <sys/time.h>
 
-#include <haproxy/api-t.h>
-#include <haproxy/list-t.h>
 #include <import/eb32sctree.h>
 #include <import/eb32tree.h>
 
+#include <haproxy/list-t.h>
+#include <haproxy/thread-t.h>
+#include <haproxy/api-t.h>
+
 /* values for task->state */
 #define TASK_SLEEPING     0x0000  /* task sleeping */
 #define TASK_RUNNING      0x0001  /* the task is currently running */
@@ -110,8 +112,6 @@ struct tasklet {
        int tid;                        /* TID of the tasklet owner, <0 if local */
 };
 
-#define TASK_IS_TASKLET(t) ((t)->nice == -32768)
-
 /*
  * The task callback (->process) is responsible for updating ->expire. It must
  * return a pointer to the task itself, except if the task has been deleted, in
@@ -136,7 +136,7 @@ struct work_list {
        void *arg;
 };
 
-#endif /* _TYPES_TASK_H */
+#endif /* _HAPROXY_TASK_T_H */
 
 /*
  * Local variables:
similarity index 98%
rename from include/proto/task.h
rename to include/haproxy/task.h
index 85ec75a6599db9067acf547d7aa6340d8d5e55fe..3ba7fb9d8fde3e95d1c88338d7aa7ec839211089 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * include/proto/task.h
+ * include/haproxy/task.h
  * Functions for task management.
  *
- * Copyright (C) 2000-2010 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_TASK_H
-#define _PROTO_TASK_H
+#ifndef _HAPROXY_TASK_H
+#define _HAPROXY_TASK_H
 
 
 #include <sys/time.h>
 
+#include <import/eb32sctree.h>
+#include <import/eb32tree.h>
+
 #include <haproxy/api.h>
-#include <haproxy/pool.h>
+#include <haproxy/fd.h>
 #include <haproxy/global.h>
 #include <haproxy/intops.h>
 #include <haproxy/list.h>
-#include <haproxy/ticks.h>
+#include <haproxy/pool.h>
+#include <haproxy/task-t.h>
 #include <haproxy/thread.h>
+#include <haproxy/ticks.h>
 
-#include <import/eb32sctree.h>
-#include <import/eb32tree.h>
-
-#include <types/task.h>
-
-#include <haproxy/fd.h>
 
 /* Principle of the wait queue.
  *
 /* The farthest we can look back in a timer tree */
 #define TIMER_LOOK_BACK       (1U << 31)
 
+/* tasklets are recognized with nice==-32768 */
+#define TASK_IS_TASKLET(t) ((t)->nice == -32768)
+
+
 /* a few exported variables */
 extern unsigned int nb_tasks;     /* total number of tasks */
 extern volatile unsigned long global_tasks_mask; /* Mask of threads with tasks in the global runqueue */
@@ -94,6 +97,7 @@ extern struct pool_head *pool_head_task;
 extern struct pool_head *pool_head_tasklet;
 extern struct pool_head *pool_head_notification;
 extern THREAD_LOCAL struct task_per_thread *sched; /* current's thread scheduler context */
+
 #ifdef USE_THREAD
 extern struct eb_root timers;      /* sorted timers tree, global */
 extern struct eb_root rqueue;      /* tree constituting the run queue */
@@ -105,8 +109,42 @@ extern struct task_per_thread task_per_thread[MAX_THREADS];
 __decl_thread(extern HA_SPINLOCK_T rq_lock);  /* spin lock related to run queue */
 __decl_thread(extern HA_RWLOCK_T wq_lock);    /* RW lock related to the wait queue */
 
-static inline struct task *task_unlink_wq(struct task *t);
-static inline void task_queue(struct task *task);
+void __task_wakeup(struct task *t, struct eb_root *);
+void __task_queue(struct task *task, struct eb_root *wq);
+
+struct work_list *work_list_create(int nbthread,
+                                   struct task *(*fct)(struct task *, void *, unsigned short),
+                                   void *arg);
+void work_list_destroy(struct work_list *work, int nbthread);
+int run_tasks_from_list(struct list *list, int max);
+
+/*
+ * This does 3 things :
+ *   - wake up all expired tasks
+ *   - call all runnable tasks
+ *   - return the date of next event in <next> or eternity.
+ */
+
+void process_runnable_tasks();
+
+/*
+ * Extract all expired timers from the timer queue, and wakes up all
+ * associated tasks.
+ */
+void wake_expired_tasks();
+
+/* Checks the next timer for the current thread by looking into its own timer
+ * list and the global one. It may return TICK_ETERNITY if no timer is present.
+ * Note that the next timer might very well be slightly in the past.
+ */
+int next_timer_expiry();
+
+/*
+ * Delete every tasks before running the master polling loop
+ */
+void mworker_cleantasks();
+
+
 
 /* return 0 if task is in run queue, otherwise non-zero */
 static inline int task_in_rq(struct task *t)
@@ -123,11 +161,21 @@ static inline int task_in_wq(struct task *t)
        return t->wq.node.leaf_p != NULL;
 }
 
+/* returns true if the current thread has some work to do */
+static inline int thread_has_tasks(void)
+{
+       return (!!(global_tasks_mask & tid_bit) |
+               (sched->rqueue_size > 0) |
+               !LIST_ISEMPTY(&sched->tasklets[TL_URGENT]) |
+               !LIST_ISEMPTY(&sched->tasklets[TL_NORMAL]) |
+               !LIST_ISEMPTY(&sched->tasklets[TL_BULK])   |
+               !MT_LIST_ISEMPTY(&sched->shared_tasklet_list));
+}
+
 /* puts the task <t> in run queue with reason flags <f>, and returns <t> */
 /* This will put the task in the local runqueue if the task is only runnable
  * by the current thread, in the global runqueue otherwies.
  */
-void __task_wakeup(struct task *t, struct eb_root *);
 static inline void task_wakeup(struct task *t, unsigned int f)
 {
        unsigned short state;
@@ -152,24 +200,6 @@ static inline void task_wakeup(struct task *t, unsigned int f)
        }
 }
 
-/* change the thread affinity of a task to <thread_mask>.
- * This may only be done from within the running task itself or during its
- * initialization. It will unqueue and requeue the task from the wait queue
- * if it was in it. This is safe against a concurrent task_queue() call because
- * task_queue() itself will unlink again if needed after taking into account
- * the new thread_mask.
- */
-static inline void task_set_affinity(struct task *t, unsigned long thread_mask)
-{
-       if (unlikely(task_in_wq(t))) {
-               task_unlink_wq(t);
-               t->thread_mask = thread_mask;
-               task_queue(t);
-       }
-       else
-               t->thread_mask = thread_mask;
-}
-
 /*
  * Unlink the task from the wait queue, and possibly update the last_timer
  * pointer. A pointer to the task itself is returned. The task *must* already
@@ -201,6 +231,59 @@ static inline struct task *task_unlink_wq(struct task *t)
        return t;
 }
 
+/* Place <task> into the wait queue, where it may already be. If the expiration
+ * timer is infinite, do nothing and rely on wake_expired_task to clean up.
+ * If the task uses a shared wait queue, it's queued into the global wait queue,
+ * protected by the global wq_lock, otherwise by it necessarily belongs to the
+ * current thread'sand is queued without locking.
+ */
+static inline void task_queue(struct task *task)
+{
+       /* If we already have a place in the wait queue no later than the
+        * timeout we're trying to set, we'll stay there, because it is very
+        * unlikely that we will reach the timeout anyway. If the timeout
+        * has been disabled, it's useless to leave the queue as well. We'll
+        * rely on wake_expired_tasks() to catch the node and move it to the
+        * proper place should it ever happen. Finally we only add the task
+        * to the queue if it was not there or if it was further than what
+        * we want.
+        */
+       if (!tick_isset(task->expire))
+               return;
+
+#ifdef USE_THREAD
+       if (task->state & TASK_SHARED_WQ) {
+               HA_RWLOCK_WRLOCK(TASK_WQ_LOCK, &wq_lock);
+               if (!task_in_wq(task) || tick_is_lt(task->expire, task->wq.key))
+                       __task_queue(task, &timers);
+               HA_RWLOCK_WRUNLOCK(TASK_WQ_LOCK, &wq_lock);
+       } else
+#endif
+       {
+               BUG_ON((task->thread_mask & tid_bit) == 0); // should have TASK_SHARED_WQ
+               if (!task_in_wq(task) || tick_is_lt(task->expire, task->wq.key))
+                       __task_queue(task, &sched->timers);
+       }
+}
+
+/* change the thread affinity of a task to <thread_mask>.
+ * This may only be done from within the running task itself or during its
+ * initialization. It will unqueue and requeue the task from the wait queue
+ * if it was in it. This is safe against a concurrent task_queue() call because
+ * task_queue() itself will unlink again if needed after taking into account
+ * the new thread_mask.
+ */
+static inline void task_set_affinity(struct task *t, unsigned long thread_mask)
+{
+       if (unlikely(task_in_wq(t))) {
+               task_unlink_wq(t);
+               t->thread_mask = thread_mask;
+               task_queue(t);
+       }
+       else
+               t->thread_mask = thread_mask;
+}
+
 /*
  * Unlink the task from the run queue. The tasks_run_queue size and number of
  * niced tasks are updated too. A pointer to the task itself is returned. The
@@ -419,43 +502,6 @@ static inline void tasklet_set_tid(struct tasklet *tl, int tid)
        tl->tid = tid;
 }
 
-void __task_queue(struct task *task, struct eb_root *wq);
-
-/* Place <task> into the wait queue, where it may already be. If the expiration
- * timer is infinite, do nothing and rely on wake_expired_task to clean up.
- * If the task uses a shared wait queue, it's queued into the global wait queue,
- * protected by the global wq_lock, otherwise by it necessarily belongs to the
- * current thread'sand is queued without locking.
- */
-static inline void task_queue(struct task *task)
-{
-       /* If we already have a place in the wait queue no later than the
-        * timeout we're trying to set, we'll stay there, because it is very
-        * unlikely that we will reach the timeout anyway. If the timeout
-        * has been disabled, it's useless to leave the queue as well. We'll
-        * rely on wake_expired_tasks() to catch the node and move it to the
-        * proper place should it ever happen. Finally we only add the task
-        * to the queue if it was not there or if it was further than what
-        * we want.
-        */
-       if (!tick_isset(task->expire))
-               return;
-
-#ifdef USE_THREAD
-       if (task->state & TASK_SHARED_WQ) {
-               HA_RWLOCK_WRLOCK(TASK_WQ_LOCK, &wq_lock);
-               if (!task_in_wq(task) || tick_is_lt(task->expire, task->wq.key))
-                       __task_queue(task, &timers);
-               HA_RWLOCK_WRUNLOCK(TASK_WQ_LOCK, &wq_lock);
-       } else
-#endif
-       {
-               BUG_ON((task->thread_mask & tid_bit) == 0); // should have TASK_SHARED_WQ
-               if (!task_in_wq(task) || tick_is_lt(task->expire, task->wq.key))
-                       __task_queue(task, &sched->timers);
-       }
-}
-
 /* Ensure <task> will be woken up at most at <when>. If the task is already in
  * the run queue (but not running), nothing is done. It may be used that way
  * with a delay :  task_schedule(task, tick_add(now_ms, delay));
@@ -586,16 +632,6 @@ static inline int notification_registered(struct list *wake)
        return !LIST_ISEMPTY(wake);
 }
 
-static inline int thread_has_tasks(void)
-{
-       return (!!(global_tasks_mask & tid_bit) |
-               (sched->rqueue_size > 0) |
-               !LIST_ISEMPTY(&sched->tasklets[TL_URGENT]) |
-               !LIST_ISEMPTY(&sched->tasklets[TL_NORMAL]) |
-               !LIST_ISEMPTY(&sched->tasklets[TL_BULK])   |
-               !MT_LIST_ISEMPTY(&sched->shared_tasklet_list));
-}
-
 /* adds list item <item> to work list <work> and wake up the associated task */
 static inline void work_list_add(struct work_list *work, struct mt_list *item)
 {
@@ -603,40 +639,7 @@ static inline void work_list_add(struct work_list *work, struct mt_list *item)
        task_wakeup(work->task, TASK_WOKEN_OTHER);
 }
 
-struct work_list *work_list_create(int nbthread,
-                                   struct task *(*fct)(struct task *, void *, unsigned short),
-                                   void *arg);
-
-void work_list_destroy(struct work_list *work, int nbthread);
-int run_tasks_from_list(struct list *list, int max);
-
-/*
- * This does 3 things :
- *   - wake up all expired tasks
- *   - call all runnable tasks
- *   - return the date of next event in <next> or eternity.
- */
-
-void process_runnable_tasks();
-
-/*
- * Extract all expired timers from the timer queue, and wakes up all
- * associated tasks.
- */
-void wake_expired_tasks();
-
-/* Checks the next timer for the current thread by looking into its own timer
- * list and the global one. It may return TICK_ETERNITY if no timer is present.
- * Note that the next timer might very well be slightly in the past.
- */
-int next_timer_expiry();
-
-/*
- * Delete every tasks before running the master polling loop
- */
-void mworker_cleantasks();
-
-#endif /* _PROTO_TASK_H */
+#endif /* _HAPROXY_TASK_H */
 
 /*
  * Local variables:
index 80744ba130c66676ab3361de97ff922d7ac105b8..48437f5f5e559fd4db9ddd559d42745bb0ad1005 100644 (file)
@@ -28,7 +28,7 @@
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
 #include <types/applet.h>
-#include <proto/task.h>
+#include <haproxy/task.h>
 
 extern unsigned int nb_applets;
 extern struct pool_head *pool_head_appctx;
index 354758188de516dadec16b389784289805be5d0f..96bf2125aaa69185e879e7d28ed80224e7a79a24 100644 (file)
@@ -40,7 +40,7 @@
 #include <types/stream_interface.h>
 
 #include <proto/stream.h>
-#include <proto/task.h>
+#include <haproxy/task.h>
 
 /* perform minimal intializations, report 0 in case of error, 1 if OK. */
 int init_channel();
index 753aea459cfd2476b2bab6022455be9b083224dc..baa801f9cd6079034ad2fa6c7bb6c29a162e4f0c 100644 (file)
@@ -30,7 +30,7 @@
 #include <types/connection.h>
 #include <haproxy/fd.h>
 #include <proto/session.h>
-#include <proto/task.h>
+#include <haproxy/task.h>
 
 extern struct pool_head *pool_head_connection;
 extern struct pool_head *pool_head_connstream;
index 29e6c1c2dcf8a8a413ac082cb6f28b61adc472bd..ad428ee4235c7c2d85f9fce2f3aab3338803dbaa 100644 (file)
@@ -23,7 +23,6 @@
 #define _PROTO_PROTO_TCP_H
 
 #include <haproxy/api.h>
-#include <types/task.h>
 #include <proto/stick_table.h>
 
 int tcp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct sockaddr_storage *remote);
index d4da40c730896c52a365a5145df144e1f35ac005..4397d601fc8e603a1595e3c178370397564ffbd7 100644 (file)
@@ -29,7 +29,6 @@
 #include <types/queue.h>
 #include <types/stream.h>
 #include <types/server.h>
-#include <types/task.h>
 
 #include <proto/backend.h>
 
index aaa23f6333e07d312edb4e8c4e209f3551873f90..04dc449ce7585639b747449847f8827255fbaabf 100644 (file)
@@ -15,7 +15,7 @@
 #include <haproxy/thread.h>
 
 #include <types/signal.h>
-#include <types/task.h>
+#include <haproxy/task-t.h>
 
 extern int signal_queue_len;
 extern struct signal_descriptor signal_state[];
index 1c0fd4547899cd3356654e53847211efad95ea46..9be8d4647529620b4019ec51ccd6e275af45b521 100644 (file)
@@ -31,7 +31,7 @@
 #include <haproxy/obj_type.h>
 #include <proto/queue.h>
 #include <proto/stick_table.h>
-#include <proto/task.h>
+#include <haproxy/task.h>
 #include <proto/trace.h>
 
 extern struct trace_source trace_strm;
index 2059c0927662ec538daa5376a50cbd292b4bf4c8..5f12c264d035a2cc28626fdfc682a49ccefc6cb2 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <haproxy/action-t.h>
 #include <haproxy/api.h>
-#include <types/task.h>
 #include <proto/stick_table.h>
 
 int tcp_inspect_request(struct stream *s, struct channel *req, int an_bit);
index 371ed431c017f8bfe7e43ebc3e4230b4be5fac40..c7f08b27666d595f63d2e9010c3d6388e1b96271 100644 (file)
@@ -25,7 +25,7 @@
 #include <types/connection.h>
 #include <haproxy/sample-t.h>
 #include <types/session.h>
-#include <types/task.h>
+#include <haproxy/task-t.h>
 
 /* enum used by check->result. Must remain in this order, as some code uses
  * result >= CHK_RES_PASSED to declare success.
index a9d333e1738cc38f3b6224c95e11278938331f89..a2f1fe368bd06f051187474843aaa61dd16c0836 100644 (file)
@@ -40,7 +40,7 @@
 #include <haproxy/freq_ctr-t.h>
 #include <types/queue.h>
 #include <types/ssl_sock.h>
-#include <types/task.h>
+#include <haproxy/task-t.h>
 #include <types/checks.h>
 
 
index 3e49b461b4b9c4a358fc6d16556bdef2662be9c4..559e7864670c470c798557268daa08d35e5be726 100644 (file)
@@ -34,7 +34,7 @@
 #include <haproxy/vars-t.h>
 
 #include <types/stick_table.h>
-#include <types/task.h>
+#include <haproxy/task-t.h>
 
 struct sess_srv_list {
        void *target;
index fdaba93eac55bedd37cc387e3b69d8c3e14b8700..c7ed45d5a3cad2bc5efddf687129bfdc269609a3 100644 (file)
@@ -34,7 +34,7 @@
 #include <types/proxy.h>
 #include <haproxy/sample-t.h>
 #include <types/stream.h>
-#include <types/task.h>
+#include <haproxy/task-t.h>
 
 /* Type of list of messages */
 #define SPOE_MSGS_BY_EVENT 0x01
index 88708428c4135f17f7f47101f18f8bb545d8e444..e2e01db051f3f7b4a1c1a37f20f0c77ce798396d 100644 (file)
@@ -43,7 +43,7 @@
 #include <types/server.h>
 #include <types/session.h>
 #include <types/stream_interface.h>
-#include <types/task.h>
+#include <haproxy/task-t.h>
 #include <types/stick_table.h>
 
 /* Various Stream Flags, bits values 0x01 to 0x100 (shift 0) */
index a7f1b7e3bcb6f2420fe9be60cfc408ee67f053a6..4889a4b16cd40deff879fb705a7b5603e78edc5e 100644 (file)
 #include <haproxy/obj_type.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 
 #include <proto/log.h>
 #include <proto/proxy.h>
 #include <proto/stick_table.h>
-#include <proto/task.h>
 
 
 /* Find and check the target table used by an action track-sc*. This
index 88be4474eb60a0635f775a306be6f3d8db5e2c7f..510faad77591825635272350e533681e58d845c7 100644 (file)
 
 #include <haproxy/api.h>
 #include <haproxy/list.h>
+#include <haproxy/task.h>
 #include <proto/applet.h>
 #include <proto/channel.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 unsigned int nb_applets = 0;
 
index 18ac58306a5d57bf1a9c4218e77dc5f08f6aafd2..02f8e86711a73e437fa97d6aa5d5075730949bbb 100644 (file)
@@ -31,6 +31,7 @@
 #include <haproxy/lb_fwrr.h>
 #include <haproxy/obj_type.h>
 #include <haproxy/payload.h>
+#include <haproxy/task.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 #include <haproxy/namespace.h>
@@ -55,7 +56,6 @@
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
 #include <proto/ssl_sock.h>
-#include <proto/task.h>
 
 #define TRACE_SOURCE &trace_strm
 
index 8ea64a199c82c10f11577829fe86d5933eb4be9b..7fc6fd5cd7d92e49394fff02fd1def6fb480c433 100644 (file)
@@ -55,6 +55,7 @@
 #include <haproxy/time.h>
 #include <common/uri_auth.h>
 #include <haproxy/namespace.h>
+#include <haproxy/task.h>
 #include <haproxy/thread.h>
 
 #include <types/filters.h>
@@ -79,7 +80,6 @@
 #include <proto/server.h>
 #include <proto/stream.h>
 #include <proto/stick_table.h>
-#include <proto/task.h>
 #include <proto/tcp_rules.h>
 #include <proto/connection.h>
 
index af34ebebb829caaf8a3861b95266e04ab86ae221..39399db3136b64f5667532b706322b3274195d87 100644 (file)
@@ -45,6 +45,7 @@
 #include <haproxy/http_htx.h>
 #include <haproxy/h1.h>
 #include <haproxy/htx.h>
+#include <haproxy/task.h>
 #include <haproxy/vars.h>
 
 #include <haproxy/global.h>
@@ -64,7 +65,6 @@
 #include <proto/server.h>
 #include <proto/signal.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 #include <proto/log.h>
 #include <haproxy/proto_udp.h>
 #include <proto/ssl_sock.h>
index b9481c1f1f49a4b8ca655f96a07e75b3e3b41824..4208ceabf2e90c76c3eff1ff783100d9f2f9317c 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -35,6 +35,7 @@
 #include <haproxy/mworker-t.h>
 #include <haproxy/pattern-t.h>
 #include <haproxy/sample-t.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
@@ -63,7 +64,6 @@
 #include <proto/stream.h>
 #include <proto/server.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 #define PAYLOAD_PATTERN "<<"
 
index c179652467d513d17245d93762acded037de85b9..30a41161bb6b41be8989df3f9e695c072eebc8e3 100644 (file)
@@ -23,6 +23,7 @@
 #include <haproxy/buf.h>
 #include <haproxy/debug.h>
 #include <haproxy/hlua.h>
+#include <haproxy/task.h>
 #include <haproxy/thread.h>
 #include <import/ist.h>
 #include <haproxy/net_helper.h>
@@ -34,7 +35,6 @@
 #include <proto/cli.h>
 #include <haproxy/fd.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 /* mask of threads still having to dump, used to respect ordering. Only used
  * when USE_THREAD_DUMP is set.
index 4fec311d2880e3199fafc8133360d55fa55a16b7..dca25756150660bb36551a4c5c5e604c41b386e8 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -26,6 +26,7 @@
 #include <haproxy/errors.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/sample.h>
+#include <haproxy/task.h>
 #include <haproxy/time.h>
 #include <haproxy/ticks.h>
 #include <haproxy/net_helper.h>
@@ -43,7 +44,6 @@
 #include <proto/http_ana.h>
 #include <proto/log.h>
 #include <proto/server.h>
-#include <proto/task.h>
 #include <haproxy/proto_udp.h>
 #include <proto/proxy.h>
 #include <proto/stream_interface.h>
index 64650ae5269fe6d67cf43d12ec2734829a1f1198..6c0ef4e1897ab393c80d18278955e239b3a3d252 100644 (file)
@@ -20,6 +20,7 @@
 #include <haproxy/sample.h>
 #include <haproxy/thread.h>
 #include <haproxy/pool.h>
+#include <haproxy/task.h>
 #include <haproxy/time.h>
 #include <haproxy/vars.h>
 
@@ -40,7 +41,6 @@
 #include <proto/spoe.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 #include <proto/tcp_rules.h>
 
 #if defined(DEBUG_SPOE) || defined(DEBUG_FULL)
index 44ac1514ffb3777692c3775b8fdc9f842dee759e..4066fe9b59d335fd39d62a94e0367678068e7cd3 100644 (file)
@@ -26,6 +26,7 @@
 #include <haproxy/chunk.h>
 #include <haproxy/frontend.h>
 #include <haproxy/sample.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 
@@ -41,7 +42,6 @@
 #include <proto/proxy.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 /* Finish a stream accept() for a proxy (TCP or HTTP). It returns a negative
  * value in case of a critical failure which must cause the listener to be
index 377bb2e598d8d983307c5a7d9fb0077747d9352e..e85b9556fc937e27ecdab0a8727ebe65328f777e 100644 (file)
 #include <haproxy/time.h>
 #include <common/uri_auth.h>
 #include <haproxy/version.h>
+#include <haproxy/task.h>
 #include <haproxy/thread.h>
 #include <haproxy/vars.h>
 
 #include <proto/session.h>
 #include <proto/stream.h>
 #include <proto/signal.h>
-#include <proto/task.h>
 #include <proto/ssl_sock.h>
 
 /* array of init calls for older platforms */
index fda7212bfebdd4a15eec62c4030dc4a836daaaa1..4ef94d1796106370b40176729cddcc017b5622d5 100644 (file)
@@ -38,6 +38,7 @@
 #include <haproxy/pattern.h>
 #include <haproxy/payload.h>
 #include <haproxy/sample.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/vars.h>
 
@@ -58,7 +59,6 @@
 #include <proto/session.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 #include <proto/tcp_rules.h>
 
 /* Lua uses longjmp to perform yield or throwing errors. This
index 417a902b48d18038834e4a00971b898bb08ea926..4d1d2de1102d9a4392ae453c0c29d8849c175a8f 100644 (file)
@@ -24,6 +24,7 @@
 #include <haproxy/global.h>
 #include <haproxy/list.h>
 #include <haproxy/listener.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 
@@ -38,7 +39,6 @@
 #include <haproxy/proto_sockpair.h>
 #include <haproxy/sample.h>
 #include <proto/stream.h>
-#include <proto/task.h>
 
 /* List head of all known bind keywords */
 static struct bind_kw_list bind_keywords = {
index 43b0da4aa72125d24e83608cfb30cb6d038a4ed8..d405e95506b2559772387e43e1f6686383a07536 100644 (file)
@@ -12,9 +12,9 @@
 
 #include <haproxy/api.h>
 #include <haproxy/buf.h>
+#include <haproxy/task.h>
 #include <proto/connection.h>
 #include <proto/stream.h>
-#include <proto/task.h>
 
 struct mux_pt_ctx {
        struct conn_stream *cs;
index 3724346347135b5027f080265daa3f8cb5ad975e..e1a2525a0c645de12fbb806b65d8eb36c7cae949 100644 (file)
@@ -25,6 +25,7 @@
 #include <haproxy/frontend.h>
 #include <haproxy/net_helper.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/task.h>
 #include <haproxy/time.h>
 #include <haproxy/tools.h>
 #include <haproxy/thread.h>
@@ -45,7 +46,6 @@
 #include <proto/signal.h>
 #include <proto/stick_table.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 
 /*******************************/
index a0453c1bcb717eeebcf52841b5e2cc7932310e4f..cca9d72ecb5f688d3208d03a9eeca31a88fe301a 100644 (file)
@@ -40,7 +40,6 @@
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
 #include <haproxy/protocol.h>
-#include <proto/task.h>
 
 static void sockpair_add_listener(struct listener *listener, int port);
 static int sockpair_bind_listener(struct listener *listener, char *errmsg, int errlen);
index e6eae9960e91a006f8ac80014b2d480dec109514..3f734a681c27cacb29ebd68907bb4632aba79d47 100644 (file)
@@ -55,7 +55,6 @@
 #include <proto/proto_tcp.h>
 #include <proto/proxy.h>
 #include <proto/server.h>
-#include <proto/task.h>
 #include <proto/tcp_rules.h>
 
 static int tcp_bind_listeners(struct protocol *proto, char *errmsg, int errlen);
index 69253732b20e79a5a80d227ef38a01803d489ca2..c826546d67e63b9dd5fdb6bb8eae2f6e688ba4de 100644 (file)
@@ -39,7 +39,6 @@
 #include <haproxy/fd.h>
 #include <proto/log.h>
 #include <haproxy/protocol.h>
-#include <proto/task.h>
 
 static int uxst_bind_listener(struct listener *listener, char *errmsg, int errlen);
 static int uxst_bind_listeners(struct protocol *proto, char *errmsg, int errlen);
index 5d422170f2ba66d4eaffea33b141699d05893eb1..71ad054dce9fa17f896754752048b0fd53c6a937 100644 (file)
@@ -24,6 +24,7 @@
 #include <haproxy/listener.h>
 #include <haproxy/obj_type-t.h>
 #include <haproxy/pool.h>
+#include <haproxy/task.h>
 #include <haproxy/time.h>
 
 #include <import/eb32tree.h>
@@ -47,7 +48,6 @@
 #include <proto/signal.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 
 int listeners; /* # of proxy listeners, set by cfgparse */
index bbf11e22d86235c3af0ba5994a514a9339c43a47..5c8f790af6be3a96c2f4aae3e4abfd0568395eb1 100644 (file)
@@ -73,6 +73,7 @@
 #include <haproxy/http_rules.h>
 #include <haproxy/pool.h>
 #include <haproxy/sample.h>
+#include <haproxy/task.h>
 #include <haproxy/time.h>
 #include <haproxy/thread.h>
 #include <import/eb32tree.h>
@@ -82,7 +83,6 @@
 #include <proto/server.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 #include <proto/tcp_rules.h>
 
 
index b5538d64ea6afd1fe266f78af31969fac8599387..396a07cc02b1511748c88b0269d19c3e9a718299 100644 (file)
@@ -35,7 +35,6 @@
 #include <proto/log.h>
 #include <haproxy/pipe.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 
 #if defined(USE_LINUX_SPLICE)
index ddc61873cbb3f7e3381e59263308c89bd80aaadd..694d5ae914651913b90f395cde7548b3aa088586 100644 (file)
@@ -24,6 +24,7 @@
 #include <haproxy/global.h>
 #include <haproxy/namespace.h>
 #include <haproxy/sample.h>
+#include <haproxy/task.h>
 #include <haproxy/time.h>
 
 #include <types/applet.h>
@@ -42,7 +43,6 @@
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
 #include <proto/stats.h>
-#include <proto/task.h>
 #include <netinet/tcp.h>
 
 #include <import/ebsttree.h>
index d989ef66bb0bb7e17d3618417bc9de9e5d990357..98ed9921dd031afd62a2e823a17097c79fe20dbf 100644 (file)
@@ -13,9 +13,9 @@
 #include <signal.h>
 #include <string.h>
 
+#include <haproxy/task.h>
 #include <proto/signal.h>
 #include <proto/log.h>
-#include <proto/task.h>
 
 /* Principle : we keep an in-order list of the first occurrence of all received
  * signals. All occurrences of a same signal are grouped though. The signal
index c1f239a7af9746cfe2c919976086a587810fb1b2..0d6267a8fc7db13a4948be5865ac2c43d61d2986 100644 (file)
@@ -56,6 +56,7 @@
 #include <haproxy/ssl_ckch.h>
 #include <haproxy/ssl_crtlist.h>
 #include <haproxy/ssl_utils.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
@@ -85,7 +86,6 @@
 #include <proto/proxy.h>
 #include <proto/ssl_sock.h>
 #include <proto/stream.h>
-#include <proto/task.h>
 
 /* ***** READ THIS before adding code here! *****
  *
index 555b56140b74bf667dc8b4037e23f5436a7dcada..281638cfead2093c75ce7c511aa8cad82f406dbe 100644 (file)
@@ -39,6 +39,7 @@
 #include <haproxy/listener.h>
 #include <haproxy/map-t.h>
 #include <haproxy/pattern-t.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
@@ -65,7 +66,6 @@
 #include <proto/stream.h>
 #include <proto/server.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 /* status codes available for the stats admin page (strictly 4 chars length) */
 const char *stat_status_codes[STAT_STATUS_SIZE] = {
index 638d30c5731f55605856871c21340b734b8232ff..9020b372ad8c77c9cda35f2e7c219ea57a25a56b 100644 (file)
@@ -21,6 +21,7 @@
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
 #include <haproxy/net_helper.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 
@@ -40,7 +41,6 @@
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
 #include <proto/stick_table.h>
-#include <proto/task.h>
 #include <proto/peers.h>
 #include <proto/tcp_rules.h>
 
index 3531e52edb05b3e34f299c43518539be15bd36d3..3780939f41092bd3a991ea79faa6e1dd7908372e 100644 (file)
@@ -29,6 +29,7 @@
 #include <haproxy/thread.h>
 #include <haproxy/htx.h>
 #include <haproxy/pool.h>
+#include <haproxy/task.h>
 #include <haproxy/vars.h>
 
 #include <types/applet.h>
@@ -58,7 +59,6 @@
 #include <proto/server.h>
 #include <proto/stick_table.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 #include <proto/tcp_rules.h>
 
 DECLARE_POOL(pool_head_stream, "stream", sizeof(struct stream));
index bd991de2d7b7fe3cb4245c2972e74d360b00aa8e..23f639fb3835e8834649231a0d216ec56e01ba69 100644 (file)
@@ -25,6 +25,7 @@
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
+#include <haproxy/task.h>
 
 #include <proto/applet.h>
 #include <proto/channel.h>
@@ -33,7 +34,6 @@
 #include <proto/proxy.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 #include <haproxy/pipe-t.h>
 
index 24c3b3e5476a39a7e485da2f921e123ba88fcbc2..f055ebb2b10697b75cd22636ffa8a64408c0a370 100644 (file)
@@ -15,6 +15,7 @@
 #include <haproxy/api.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <import/eb32sctree.h>
@@ -24,7 +25,6 @@
 #include <haproxy/freq_ctr.h>
 #include <proto/proxy.h>
 #include <proto/stream.h>
-#include <proto/task.h>
 
 DECLARE_POOL(pool_head_task,    "task",    sizeof(struct task));
 DECLARE_POOL(pool_head_tasklet, "tasklet", sizeof(struct tasklet));
index 6dda8aa9ab4f27a4732f9551b5075a4584dbce64..fd777955594c3cbc6c9f4b421f6a52511f799164 100644 (file)
 #include <haproxy/hlua.h>
 #include <haproxy/listener.h>
 #include <haproxy/namespace.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <proto/applet.h>
 #include <haproxy/proto_udp.h>
 #include <proto/ssl_sock.h>
 #include <proto/stream_interface.h>
-#include <proto/task.h>
 
 /* This macro returns false if the test __x is false. Many
  * of the following parsing function must be abort the processing