miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Loading...
Searching...
No Matches
spinlock_t Struct Reference

#include <spinlock.h>

Public Attributes

volatile uint16_t counter

Detailed Description

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).

Member Data Documentation

◆ counter

volatile uint16_t spinlock_t::counter

The documentation for this struct was generated from the following file: