pub struct Ringbuffer {
seq: u64,
buffer: [u8; 1048576],
head: usize,
tail: usize,
}Expand description
The kernel ringbuffer
Fields§
§seq: u64§buffer: [u8; 1048576]§head: usize§tail: usizeImplementations§
Source§impl Ringbuffer
impl Ringbuffer
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Constructor; create a new empty Ringbuffer
Sourcepub fn write_entry(
&mut self,
log_level: LogLevel,
log_flags: LogFlags,
text: &[u8],
) -> LogEntryHeader
pub fn write_entry( &mut self, log_level: LogLevel, log_flags: LogFlags, text: &[u8], ) -> LogEntryHeader
Constructs and writes a LogEntryHeader followed by the given text to the ringbuffer
Sourcefn write_bytes(&mut self, bytes: &[u8])
fn write_bytes(&mut self, bytes: &[u8])
Write raw bytes into the ring buffer
Sourcefn advance_tail(&mut self)
fn advance_tail(&mut self)
Advance Ringbuffer::tail to the next entry