Umm??
We always set prev->has_cpu to zero, and we always set next->has_cpu to
one. That always works - even if next == prev, in which case it doesn't
actually do anything. I don't see the problem: schedule() is always
guaranteed to be entered with "current->has_cpu == 1" (because otherwise
it couldn't have scheduled in the first place) and schedule() will always
exit with "current->has_cpu" still set to one (except "current" can be
different).
I guess I still don't see what your worry is.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/