android_kernel_motorola_sm6375/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Oleg Nesterov 74e37200de proc: cleanup/simplify get_task_state/task_state_array
get_task_state() and task_state_array[] look confusing and suboptimal, it
is not clear what it can actually report to user-space and
task_state_array[] blows .data for no reason.

1. state = (tsk->state & TASK_REPORT) | tsk->exit_state is not
   clear. TASK_REPORT is self-documenting but it is not clear
   what ->exit_state can add.

   Move the potential exit_state's (EXIT_ZOMBIE and EXIT_DEAD)
   into TASK_REPORT and use it to calculate the final result.

2. With the change above it is obvious that task_state_array[]
   has the unused entries just to make BUILD_BUG_ON() happy.

   Change this BUILD_BUG_ON() to use TASK_REPORT rather than
   TASK_STATE_MAX and shrink task_state_array[].

3. Turn the "while (state)" loop into fls(state).

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: David Laight <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2014-01-23 16:37:01 -08:00
..
acpi PCI changes for the v3.14 merge window: 2014-01-22 16:39:28 -08:00
asm-generic add generic fixmap.h 2014-01-23 16:36:54 -08:00
clocksource
crypto
drm drm/radeon: 0x9649 is SUMO2 not SUMO 2013-12-23 10:03:41 -05:00
dt-bindings
keys
kvm
linux proc: cleanup/simplify get_task_state/task_state_array 2014-01-23 16:37:01 -08:00
math-emu
media
memory
misc
net Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-01-20 10:42:08 -08:00
pcmcia
ras
rdma
rxrpc
scsi
sound Merge remote-tracking branch 'asoc/topic/compress' into asoc-next 2014-01-20 11:50:41 +00:00
target
trace f2fs updates for v3.14 2014-01-23 09:21:09 -08:00
uapi uapi: convert u64 to __u64 in exported headers 2014-01-23 16:36:55 -08:00
video
xen Features: 2014-01-22 22:00:18 -08:00
Kbuild