Oleg Nesterov f31e11d87a 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>
2008-08-22 15:17:29 +02:00
..
2008-07-28 23:32:00 +02:00
2008-05-01 08:03:59 -07:00
2008-07-26 20:53:20 -04:00
2008-08-01 12:01:11 -07:00
2008-07-28 16:30:21 -07:00
2008-03-30 14:18:41 -07:00
2008-07-28 14:37:38 +02:00
2008-07-26 12:00:04 -07:00
2008-08-01 08:39:35 -05:00
2008-07-26 12:00:09 -07:00
2008-08-11 22:45:51 +02:00
2008-08-05 14:33:50 -07:00
2008-07-26 12:00:09 -07:00
2008-07-30 09:41:43 -07:00
2008-08-11 14:49:29 +02:00
2008-08-11 09:30:24 +02:00
2008-07-26 12:00:04 -07:00
2008-07-25 10:53:45 -07:00
2008-07-27 09:45:34 -07:00
2008-04-30 08:29:53 -07:00