Skip to main content

Module kernel_writer

Module kernel_writer 

Source
Expand description

Kernel Writer, locks the logging state (ringbuffer, basic fb state, โ€ฆ), collects text, builds log entry, writes it and dispatches the full log message to receivers

Authors: MarioS271

Re-exportsยง

use crate::kprint::log_entry::LogFlags; ๐Ÿ”’
use crate::kprint::log_entry::LogLevel; ๐Ÿ”’
use crate::kprint::receivers::KPrintReceiver; ๐Ÿ”’
use crate::kprint::state::KPrintState; ๐Ÿ”’
use crate::kprint::state::LogTargets; ๐Ÿ”’
use crate::lib::sync::irq_mutex::IrqMutexGuard; ๐Ÿ”’
use crate::state::kstate::KSTATE; ๐Ÿ”’
use core::fmt::Write; ๐Ÿ”’

Structsยง

KernelWriter
Wrapper that holds the acquired Ringbuffer guard and a buffer in which [core::fmt::write] calls get written, which then gets written to the ring buffer

Constantsยง

WRITE_BUFFER_SIZE
Size of the intermediary log buffer (2 KiB)