disable_preemption | Atomic | Prevent involuntary context switch on the current CPU. Doesn't affect interrupts |
cli | Atomic | Prevent all asynchronous activity in the current CPU |
spin_lock | Atomic | Prevent access from other CPU. Imply disable_preemption to avoid deadlock. Need cli to avoid deadlock with interrupt context |
mutex_lock | May sleep | Prevent access from any other context. May not be used in atomic context |