Interrupts, Spin Locks, and Preemption

Interrupts

Spin Locks

Preemption

If TIF_NEED_RESCHED is set, preemption occurs by calling schedule() in the following cases:

  1. Returning to user space:

  2. Returning to kernel from an interrupt handler, only if preempt_count is zero

  3. preempt_count just became zero – right after spin_unlock(), for example

  4. Thread running in kernel mode calls schedule() itself – blocking syscall, for example


Last updated: 2016–03–31