lkml.org 
[lkml]   [2017]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/35] sched/headers: Remove <linux/sched.h> from <linux/sched/wake_q.h>
Date
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
\
 
 \ /
  Last update: 2017-02-08 20:09    [W:0.123 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site