|
miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
|
#include <spinlock.h>
Public Attributes | |
| volatile uint16_t | counter |
spinlock_t — FIFO ticket spinlock.
counter layout (16-bit): bits [7:0] = owner — ticket currently being served bits [15:8] = next — next ticket to issue
Free iff owner == next (counter == 0 after SPINLOCK_INIT). Supports at most 256 simultaneous waiters (MAX_CPUS=8 is well within this).
| volatile uint16_t spinlock_t::counter |