![]() | |||||||||||
Messages in this thread Complete thread (EXPERIMENTAL) |
Another question:
if (likely(prev != next)) { rq->nr_switches++; rq->curr = next; next->cpu = prev->cpu; context_switch(prev, next); /* * The runqueue pointer might be from another CPU * if the new task was last running on a different * CPU - thus re-load it. */ barrier(); rq = this_rq(); } spin_unlock_irq(&rq->lock); I do not understand this comment. How can rq (ie. smp_processor_id()) change? Nothing sleeps here, and if it DID change, the spin_unlock_irq() would be wrong... If you switch you'll on the stack the rq of the previous cpu spin_unlock_irq(&rq->lock) is fine if you do not switch and if you switch you need to reload rq - Davide | ||||||||||
![]() | |||||||||||
| Last update: 2005-03-22 12:15 [W:0.158 / U:0.320 seconds] ©2003-2005 Jasper Spaans | |||||||||||