Re: prev->has_cpu

Andrea Arcangeli (andrea@e-mind.com)
Fri, 13 Nov 1998 12:53:10 +0100 (CET)


On Fri, 13 Nov 1998, Andrea Arcangeli wrote:

>Does this patch make sense or I have slept too little this night ;-)?

This should be the right patch....

*** linux/kernel/sched.c~ Fri Nov 13 11:37:39 1998
--- linux/kernel/sched.c Fri Nov 13 11:39:06 1998
***************
*** 604,620 ****
}
}

- #ifdef __SMP__
- next->has_cpu = 1;
- next->processor = this_cpu;
- #endif
-
if (prev != next) {
kstat.context_swtch++;
get_mmu_context(next);
switch_to(prev,next);
}

spin_unlock(&scheduler_lock);

/*
--- 604,622 ----
}
}

if (prev != next) {
kstat.context_swtch++;
get_mmu_context(next);
+ #ifdef __SMP__
+ next->processor = this_cpu;
+ #endif
switch_to(prev,next);
}

+ #ifdef __SMP__
+ prev->has_cpu = 1;
+ #endif
+
spin_unlock(&scheduler_lock);

/*

-
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/