pub struct KernelWriter {
state: IrqMutexGuard<'static, KPrintState>,
buffer: [u8; 2048],
text_len: usize,
log_level: LogLevel,
log_flags: LogFlags,
}Expand description
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
Fields§
§state: IrqMutexGuard<'static, KPrintState>§buffer: [u8; 2048]§text_len: usize§log_level: LogLevel§log_flags: LogFlagsImplementations§
Source§impl KernelWriter
impl KernelWriter
Sourcepub fn lock(log_level: LogLevel, log_flags: LogFlags) -> Self
pub fn lock(log_level: LogLevel, log_flags: LogFlags) -> Self
Acquire the ringbuffer and return a KernelWriter holding the guard
Trait Implementations§
Source§impl Drop for KernelWriter
impl Drop for KernelWriter
Source§fn drop(&mut self)
fn drop(&mut self)
Write intermediary write buffer into ringbuffer as an entry and output to all kprint receivers
§fn pin_drop(self: Pin<&mut Self>)
fn pin_drop(self: Pin<&mut Self>)
🔬This is a nightly-only experimental API. (
pin_ergonomics)Execute the destructor for this type, but different to
Drop::drop, it requires self
to be pinned. Read more