From: Oleg Nesterov Date: Wed, 20 Aug 2008 23:54:44 +0000 (-0700) Subject: wait_task_inactive: "improve" the returned value for ->nvcsw == 0 X-Git-Tag: v2.6.28-rc1~725^2~2^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93dcf55f828b035fc93fc19eb03c1390e1e6d570;p=pandora-kernel.git wait_task_inactive: "improve" the returned value for ->nvcsw == 0 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 Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed