Skip to contentSkip to conversation

kernel sema implementation question

DISCUSSION Eugeny S. Mints 1 participant 1 message Jun 16, 2004

lore
Share & tools
lore
#0 lore raw

Hi Community!

Could anybody please answer the question about kernel semaphore up() routine. I use kernel 2.6.6 on i386 but the question is about arch independent part.

Arch dependent up() implementation leads to try_to_wake_up () which calls resched_task() if the task been woken up preempts the current task.

The question is - when the context switch actually occures? (resched_task only sets the bit but doesn't switch anything)

Thanks,
Eugeny