# Spinlocks

> In general, the term “spinlock” means a synchronization primitive that does not require a process context switch or any other kernel activities. Usually it is implemented as a assembler loop over a variable. In some cases using this kind light-weight primitive makes sense for performance reasons since no kernel call is involved. But sometimes it is better to avoid a spinlock because a tight assembler loop does not allow the CPU to sleep which, for example, is bad for a battery.