OSDN Git Service

sched/headers: Remove #ifdefs from <linux/sched.h>
[tomoyo/tomoyo-test1.git] / include / linux / sched.h
index b361f88..341f579 100644 (file)
@@ -4,6 +4,7 @@
 #include <uapi/linux/sched.h>
 
 #include <linux/sched/prio.h>
+#include <linux/nodemask.h>
 
 #include <linux/mutex.h>
 #include <linux/plist.h>
 
 #include <linux/sem.h>
 #include <linux/shm.h>
-#include <linux/signal.h>
 #include <linux/signal_types.h>
 #include <linux/pid.h>
 #include <linux/seccomp.h>
-#include <linux/rculist.h>
+#include <linux/rcupdate.h>
 
 #include <linux/resource.h>
 #include <linux/hrtimer.h>
 #include <linux/kcov.h>
 #include <linux/task_io_accounting.h>
 #include <linux/latencytop.h>
-#include <linux/topology.h>
-#include <linux/magic.h>
 
 #include <asm/current.h>
 
@@ -226,8 +224,8 @@ struct task_cputime {
 #define prof_exp       stime
 #define sched_exp      sum_exec_runtime
 
-#ifdef CONFIG_SCHED_INFO
 struct sched_info {
+#ifdef CONFIG_SCHED_INFO
        /* cumulative counters */
        unsigned long pcount;         /* # of times run on this cpu */
        unsigned long long run_delay; /* time spent waiting on a runqueue */
@@ -235,8 +233,8 @@ struct sched_info {
        /* timestamps */
        unsigned long long last_arrival,/* when we last ran on a cpu */
                           last_queued; /* when we were last queued to run */
-};
 #endif /* CONFIG_SCHED_INFO */
+};
 
 /*
  * Integer metrics need fixed point arithmetic, e.g., sched/fair
@@ -248,12 +246,6 @@ struct sched_info {
 # define SCHED_FIXEDPOINT_SHIFT        10
 # define SCHED_FIXEDPOINT_SCALE        (1L << SCHED_FIXEDPOINT_SHIFT)
 
-#ifdef ARCH_HAS_PREFETCH_SWITCH_STACK
-extern void prefetch_stack(struct task_struct *t);
-#else
-static inline void prefetch_stack(struct task_struct *t) { }
-#endif
-
 struct load_weight {
        unsigned long weight;
        u32 inv_weight;
@@ -317,8 +309,8 @@ struct sched_avg {
        unsigned long load_avg, util_avg;
 };
 
-#ifdef CONFIG_SCHEDSTATS
 struct sched_statistics {
+#ifdef CONFIG_SCHEDSTATS
        u64                     wait_start;
        u64                     wait_max;
        u64                     wait_count;
@@ -350,8 +342,8 @@ struct sched_statistics {
        u64                     nr_wakeups_affine_attempts;
        u64                     nr_wakeups_passive;
        u64                     nr_wakeups_idle;
-};
 #endif
+};
 
 struct sched_entity {
        struct load_weight      load;           /* for load-balancing */
@@ -366,9 +358,7 @@ struct sched_entity {
 
        u64                     nr_migrations;
 
-#ifdef CONFIG_SCHEDSTATS
        struct sched_statistics statistics;
-#endif
 
 #ifdef CONFIG_FAIR_GROUP_SCHED
        int                     depth;
@@ -538,9 +528,7 @@ struct task_struct {
        int rcu_tasks_idle_cpu;
 #endif /* #ifdef CONFIG_TASKS_RCU */
 
-#ifdef CONFIG_SCHED_INFO
        struct sched_info sched_info;
-#endif
 
        struct list_head tasks;
 #ifdef CONFIG_SMP
@@ -1302,8 +1290,6 @@ static inline struct thread_info *task_thread_info(struct task_struct *task)
 # define task_thread_info(task)        ((struct thread_info *)(task)->stack)
 #endif
 
-extern struct pid_namespace init_pid_ns;
-
 /*
  * find a task by one of its numerical ids
  *
@@ -1464,11 +1450,6 @@ static inline unsigned int task_cpu(const struct task_struct *p)
 #endif
 }
 
-static inline int task_node(const struct task_struct *p)
-{
-       return cpu_to_node(task_cpu(p));
-}
-
 extern void set_task_cpu(struct task_struct *p, unsigned int cpu);
 
 #else