Open Source & Linux Lab

It's better when it's simple

User Tools

Site Tools


etc:users:jcmvbkbc:phantom:locking-idioms

Synchronization idioms

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
etc/users/jcmvbkbc/phantom/locking-idioms.txt · Last modified: 2016/08/08 20:53 by kel