Big changes are still happening
oh boy this is taking way too long
Rewritten kprint
kprint, the kernel print macro has been fully rewritten. The public macros have not changed, but internally, the macros now:
- Construct a kernel writer
- Call
core::fmt::writeon the kernel writer
The kernel writer collects the text of all calls made to it using core::fmt::write in an internal buffer, and on drop, it pushes a new entry into the kernel log ringbuffer in a format that is (currently only partially) syslog-compatible. Then, the kernel writer dispatches a log header and the full log text to all active log recievers (like UART or the basic framebuffer).
New Types
-
PackedU8: A type which wraps all the bitwise logic for packing multiple pieces of data which are less than one byte into a byte -
UncheckedCell: A datatype with interior mutability, which can be uninitialized viaMaybeUninit. When the cargo featuredebug-checksis enabled, this type also checks for double initialization and uninitialized access -
NicheCell: A datatype with interior mutability, which can be uninitialized viaOption. This datatype is designed to be used with values that can take advantage of niche optimization (where the datatypeThas a value which is guaranteed to be invalid, like aNonZeroU64being zero)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.