wait_task_inactive: "improve" the returned value for ->nvcsw == 0
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 20 Aug 2008 23:54:44 +0000 (16:54 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 22 Aug 2008 13:17:31 +0000 (15:17 +0200)
wait_task_inactive() returns 1 when p->nvcsw == 0 || p->nvcsw == 1.  This
means that two subsequent calls can return the same number while the task
was scheduled in between.

Change the code to return "nvcsw | LONG_MIN" instead of "nvcsw ?: 1", now
the overlap always needs LONG_MAX schedules.

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>

No differences found