]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Create more preempt_count accessors
authorPeter Zijlstra <peterz@infradead.org>
Wed, 14 Aug 2013 12:55:46 +0000 (14:55 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 25 Sep 2013 12:07:52 +0000 (14:07 +0200)
commitd58c55aebbdd5b7b4c3c82303487e5151beea3f8
tree3672a4ca3409cae40d5c7338ad9bfa590045dcbc
parent62fab4c4c52686e7a13b95a1c6a16f36bd7b0075
sched: Create more preempt_count accessors

We need a few special preempt_count accessors:
 - task_preempt_count() for when we're interested in the preemption
   count of another (non-running) task.
 - init_task_preempt_count() for properly initializing the preemption
   count.
 - init_idle_preempt_count() a special case of the above for the idle
   threads.

With these no generic code ever touches thread_info::preempt_count
anymore and architectures could choose to remove it.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/n/tip-jf5swrio8l78j37d06fzmo4r@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/asm-generic/preempt.h
include/trace/events/sched.h
kernel/sched/core.c