From 6fb5ea4a3764d6e7d20c88325198243cbf4c218c Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Thu, 10 Nov 2011 12:41:56 -0800 Subject: [PATCH] --- yaml --- r: 277223 b: refs/heads/master c: c4f3060843506ba6d473ab9a0afe5bd5dc93a00d h: refs/heads/master i: 277221: 0f8087b51781f55584af064df00218d2c4f4e037 277219: 024e360c19dd1743f8eb052ac0e992342ad57f88 277215: b0bb2065ffb81f6cf4bb3b059bb2538531404111 v: v3 --- [refs] | 2 +- trunk/include/linux/sched.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ea48a20d9bf2..972dc07240b1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bb3bf7052de520f2d21a1275e95fac7a84d89e4c +refs/heads/master: c4f3060843506ba6d473ab9a0afe5bd5dc93a00d diff --git a/trunk/include/linux/sched.h b/trunk/include/linux/sched.h index 1c4f3e9b9bc5..4a7e4d333a27 100644 --- a/trunk/include/linux/sched.h +++ b/trunk/include/linux/sched.h @@ -2070,6 +2070,14 @@ extern int sched_setscheduler(struct task_struct *, int, extern int sched_setscheduler_nocheck(struct task_struct *, int, const struct sched_param *); extern struct task_struct *idle_task(int cpu); +/** + * is_idle_task - is the specified task an idle task? + * @tsk: the task in question. + */ +static inline bool is_idle_task(struct task_struct *p) +{ + return p->pid == 0; +} extern struct task_struct *curr_task(int cpu); extern void set_curr_task(int cpu, struct task_struct *p);