]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: task: move the task_per_thread definition to task.h
authorWilly Tarreau <w@1wt.eu>
Tue, 30 Apr 2019 12:36:47 +0000 (14:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Apr 2019 12:36:47 +0000 (14:36 +0200)
It's the second time I look for it and can't find it because it's not
in the right file.

include/proto/task.h
include/types/task.h

index badd130844effc164a9f8bc081a5838b4ea79793..859aea385b88f78b43405098f3699ef52ff129db 100644 (file)
@@ -98,16 +98,6 @@ extern struct eb_root rqueue;      /* tree constituting the run queue */
 extern int global_rqueue_size; /* Number of element sin the global runqueue */
 #endif
 
-/* force to split per-thread stuff into separate cache lines */
-struct task_per_thread {
-       struct eb_root timers;  /* tree constituting the per-thread wait queue */
-       struct eb_root rqueue;  /* tree constituting the per-thread run queue */
-       struct list task_list;  /* List of tasks to be run, mixing tasks and tasklets */
-       int task_list_size;     /* Number of tasks in the task_list */
-       int rqueue_size;        /* Number of elements in the per-thread run queue */
-       __attribute__((aligned(64))) char end[0];
-};
-
 extern struct task_per_thread task_per_thread[MAX_THREADS];
 
 __decl_hathreads(extern HA_SPINLOCK_T rq_lock);  /* spin lock related to run queue */
index 508667c7b4c67e0e2381c61ad57373043da11a3a..ab909d0f8f33f809a5ca766620c2a6200329f3f5 100644 (file)
@@ -57,6 +57,16 @@ struct notification {
        __decl_hathreads(HA_SPINLOCK_T lock);
 };
 
+/* force to split per-thread stuff into separate cache lines */
+struct task_per_thread {
+       struct eb_root timers;  /* tree constituting the per-thread wait queue */
+       struct eb_root rqueue;  /* tree constituting the per-thread run queue */
+       struct list task_list;  /* List of tasks to be run, mixing tasks and tasklets */
+       int task_list_size;     /* Number of tasks in the task_list */
+       int rqueue_size;        /* Number of elements in the per-thread run queue */
+       __attribute__((aligned(64))) char end[0];
+};
+
 /* This part is common between struct task and struct tasklet so that tasks
  * can be used as-is as tasklets.
  */