Expand description
Kernel print macro ([kprint!]) and the logging state behind it.
Authors: MarioS271
Structsยง
- Kernel
Print ๐State - All mutable state for the
kprintsubsystem, protected by anIrqMutex. - Kernel
Writer - RAII handle that holds the
KPRINT_STATElock for onekprint!call, preventing interleaved output.
Enumsยง
Constantsยง
- LOG_
BUFFER_ ๐SIZE - Capacity of the in-memory log ring buffer in bytes.
Staticsยง
- KPRINT_
STATE ๐ - Global logging state. Wrapped in
IrqMutexso interrupt handlers can log safely.
Functionsยง
- force_
unlock_ โkprint_ state - Release
KPRINT_STATEโs lock without restoring the interrupt flag, for panic paths. - kprint ๐
- Write
stringto the ring buffer, serial port, and framebuffer (if each is initialized). - write_
log_ ๐buf - Append
sto the ring buffer, advancing the tail when the head laps it.