Chapter 9. What Functions Are Safe To Call From Interrupts?

Table of Contents

Some Functions Which Sleep
Some Functions Which Don't Sleep

Many functions in the kernel sleep (ie. call schedule()) directly or indirectly: you can never call them while holding a spinlock, or with preemption disabled. This also means you need to be in user context: calling them from an interrupt is illegal.