Simple spinlock operations Declare/initialize with: #include spinlock_t my_lock = SPIN_LOCK_UNLOCKED; /* ... or (preferred) ... */ spinlock_t my_lock; spin_lock_init(&my_lock); Acquisition functions: void spin_lock(spinlock_t *lock); void spin_unlock(spinlock_t *lock); Notes Spinlock ops are not interruptible Deadlocks are easy to create