summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_debug.h
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-08-20 16:54:44 -0700
committerIngo Molnar <mingo@elte.hu>2008-08-22 15:17:29 +0200
commitf31e11d87a5d7601636710195891ba462ad99f11 (patch)
tree84cabe2eccab1bec8a5302f9a6105ebda1fec492 /drivers/usb/musb/musb_debug.h
parent94d3d8247de22c5b0624aa00616ceca459498e55 (diff)
downloadkernel-crypto-f31e11d87a5d7601636710195891ba462ad99f11.tar.gz
kernel-crypto-f31e11d87a5d7601636710195891ba462ad99f11.tar.xz
kernel-crypto-f31e11d87a5d7601636710195891ba462ad99f11.zip
wait_task_inactive(): don't consider task->nivcsw
If wait_task_inactive() returns success the task was deactivated. In that case schedule() always increments ->nvcsw which alone can be used as a "generation counter". If the next call returns the same number, we can be sure that the task was unscheduled. Otherwise, because we know that .on_rq == 0 again, ->nvcsw should have been changed in between. Q: perhaps it is better to do "ncsw = (p->nvcsw << 1) | 1" ? This decreases the possibility of "was it unscheduled" false positive when ->nvcsw == 0. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/usb/musb/musb_debug.h')
0 files changed, 0 insertions, 0 deletions