diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-01 14:39:51 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-01 14:39:51 +0100 |
commit | 4e28ec3d5fe0b994fe87b2406d75d9c351ef4940 (patch) | |
tree | af6fbb01ca736ff7e9f57bed685508bd74fc7cac /include/linux/sched.h | |
parent | a2c1bc645e87346150516b3abf1933ed29d0f48b (diff) | |
parent | 6af33995318fdfb4914fb1c5e67450fdb3d32084 (diff) | |
download | op-kernel-dev-4e28ec3d5fe0b994fe87b2406d75d9c351ef4940.zip op-kernel-dev-4e28ec3d5fe0b994fe87b2406d75d9c351ef4940.tar.gz |
Merge back earlier cpuidle material for v4.10.
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index e9c009d..a3d338e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2254,6 +2254,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, /* * Per process flags */ +#define PF_IDLE 0x00000002 /* I am an IDLE thread */ #define PF_EXITING 0x00000004 /* getting shut down */ #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ @@ -2611,7 +2612,7 @@ extern struct task_struct *idle_task(int cpu); */ static inline bool is_idle_task(const struct task_struct *p) { - return p->pid == 0; + return !!(p->flags & PF_IDLE); } extern struct task_struct *curr_task(int cpu); extern void ia64_set_curr_task(int cpu, struct task_struct *p); |