]> Git Repo - linux.git/commit
do_wait-wakeup-optimization: simplify task_pid_type()
authorOleg Nesterov <[email protected]>
Wed, 23 Sep 2009 22:56:49 +0000 (15:56 -0700)
committerLinus Torvalds <[email protected]>
Thu, 24 Sep 2009 14:21:00 +0000 (07:21 -0700)
commit989264f4645c183331a1279d513f4b1ddc06e1f5
tree44dc1d6ae0ba66229a6b9e85ac22a3edc87a4b8d
parent5c01ba49e6647d86bc7576105f82027200d1f303
do_wait-wakeup-optimization: simplify task_pid_type()

task_pid_type() is only used by eligible_pid() which has to check wo_type
!= PIDTYPE_MAX anyway.  Remove this check from task_pid_type() and factor
out ->pids[type] access, this shrinks .text a bit and simplifies the code.

The matches the behaviour of other similar helpers, say get_task_pid().
The caller must ensure that pid_type is valid, not the callee.

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Roland McGrath <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/exit.c
This page took 0.054011 seconds and 4 git commands to generate.