Re: [PATCH 2/5] Use macros instead of TASK_ flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Matthew Wilcox <[email protected]> wrote:

> +#define is_task_stopped(task)	((task->state & TASK_STOPPED) != 0)
> +#define is_task_stopped_or_traced(task)	\
> +			((task->state & (TASK_STOPPED | TASK_TRACED)) != 0)
> +#define is_task_loadavg(task)	((task->state & TASK_UNINTERRUPTIBLE) != 0)

1) please change 'is' and 'task' around so that it reads nicer:

   if (task_is_stopped(t))

instead of the tongue-twister:

   if (is_task_stopped(t))

2) please change task_is_loadavg() to something more sensible - i didnt 
know what it meant when i first saw it in -mm's sched.c. 
task_is_uninterruptible() would be the logical choice ...

	Ingo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux