[lkml]   [1998]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 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.


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

I guess I still don't see what your worry is.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:45    [W:0.056 / U:0.048 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site