previous | start | next

Interrupt Context

The kernel code begins in interrupt context when a hardware interrupt occurs.

The interrupted user code/process is irrelevant to the handling the interrupt.

If the interrupt handler calls "sleep" at this point, it is NOT the interrupted user process that is blocked.

The "sleep" call schedules some process to run, but there would be no process to return continue when the sleep condition ends.

Conclusion: Kernel code executing in interrupt context must not "sleep" or call any other kernel function that may "sleep".



previous | start | next