lkml.org 
[lkml]   [2013]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/12] pid: rewrite task helper functions avoiding task->pid and task->tgid
On Tue, Dec 17, 2013 at 10:34:42AM +0100, Peter Zijlstra wrote:
> On Mon, Dec 16, 2013 at 05:20:51PM -0500, Richard Guy Briggs wrote:
>
> > static inline bool is_idle_task(const struct task_struct *p)
> > {
> > - return p->pid == 0;
> > + return task_pid(p) == &init_struct_pid;
> > }
>
> > I'll stick with task_pid_nr(p) == 0.
>
> We're going to probably switch to:
>
> return p->flags & PF_IDLE;
>
> Soon, because people are playing silly tricks and want normal threads
> to temporarily appear to be the idle thread (idle time injection).

See http://marc.info/?l=linux-kernel&m=138548236506953&w=2 for more
context.


\
 
 \ /
  Last update: 2013-12-17 11:01    [W:0.443 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site