Messages in this thread | | | Date | Fri, 13 Nov 1998 10:29:31 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: prev->has_cpu |
| |
On Fri, 13 Nov 1998, Andrea Arcangeli wrote: > > The point is that we _always_ set prev->use_cpu to 0. So if we are not > going to switch_to() we' ll continue with current->use_cpu set to 0 and > we' ll have a still sleeping process with use_cpu set to 1.
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/
| |