Messages in this thread Patch in this message | | | From | Ingo Molnar <> | Subject | [PATCH 03/35] sched/headers: Remove <linux/sched.h> from <linux/sched/wake_q.h> | Date | Wed, 8 Feb 2017 19:50:55 +0100 |
| |
After adding a 'struct task_struct' predeclaration the <linux/sched/wake_q.h> file becomes a self-contained header and users of it either don't need <linux/sched.h> - or have already included it.
This reduces the size of the header dependency graph.
Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> --- include/linux/sched/wake_q.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/sched/wake_q.h b/include/linux/sched/wake_q.h index ed66823e845b..e6774a0385fb 100644 --- a/include/linux/sched/wake_q.h +++ b/include/linux/sched/wake_q.h @@ -1,8 +1,6 @@ #ifndef _LINUX_SCHED_WAKE_Q_H #define _LINUX_SCHED_WAKE_Q_H -#include <linux/sched.h> - /* * Wake-queues are lists of tasks with a pending wakeup, whose * callers have already marked the task as woken internally, @@ -29,6 +27,9 @@ * must ensure the call is done inside a loop, confirming that the * wakeup condition has in fact occurred. */ + +struct task_struct; + struct wake_q_node { struct wake_q_node *next; }; -- 2.7.4
| |