pub struct Hunk<System: KernelStatic> { /* private fields */ }
Expand description
Represents a single hunk in a system.
Hunks are nothing more than static variables defined in a kernel configuration. They come in handy when you are designing a component that can be instantiated by a kernel configuration and wanting each instance to have its own separate state data.
This Hunk
is untyped and only contains a starting address. See
r3::hunk::Hunk
for a type-safe wrapper of Hunk
.
Relation to Other Specifications: None. The need for programmatically defining static regions has been traditionally fulfilled by code generation and preprocessor-based composition. The closest thing might be cell internal variables in the component system that comes with the TOPPERS kernels.
Implementations§
source§impl<System: KernelStatic> Hunk<System>
impl<System: KernelStatic> Hunk<System>
sourcepub const fn define() -> HunkDefiner<System>
pub const fn define() -> HunkDefiner<System>
Construct a HunkDefiner
to define a hunk in a
configuration function.