diff options
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 4c2b87fd5f52..26566d0c67ac 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
@@ -15,6 +15,9 @@ | |||
15 | 15 | ||
16 | struct rq; | 16 | struct rq; |
17 | 17 | ||
18 | /* task_struct::on_rq states: */ | ||
19 | #define TASK_ON_RQ_QUEUED 1 | ||
20 | |||
18 | extern __read_mostly int scheduler_running; | 21 | extern __read_mostly int scheduler_running; |
19 | 22 | ||
20 | extern unsigned long calc_load_update; | 23 | extern unsigned long calc_load_update; |
@@ -942,6 +945,10 @@ static inline int task_running(struct rq *rq, struct task_struct *p) | |||
942 | #endif | 945 | #endif |
943 | } | 946 | } |
944 | 947 | ||
948 | static inline int task_on_rq_queued(struct task_struct *p) | ||
949 | { | ||
950 | return p->on_rq == TASK_ON_RQ_QUEUED; | ||
951 | } | ||
945 | 952 | ||
946 | #ifndef prepare_arch_switch | 953 | #ifndef prepare_arch_switch |
947 | # define prepare_arch_switch(next) do { } while (0) | 954 | # define prepare_arch_switch(next) do { } while (0) |