#[repr(C)]pub struct KernelConfig {
pub stack_size: usize,
pub idle: IdlePolicy,
pub measure: Measure,
pub slice_cycles: u32,
pub timer_hz: u32,
pub active_cores: usize,
}Expand description
Immutable-after-init configuration snapshot, stored in KERNEL so the
tick path and the measurement paths can read it without a lock.
Fields§
§stack_size: usize§idle: IdlePolicy§measure: Measure§slice_cycles: u32Cycles per slice actually programmed into the hardware timer. This is the achieved value, after rounding/clamping of the user request.
timer_hz: u32Timer frequency in Hz (Cortex-M: core clock; host: timer tick rate).
active_cores: usizeHow many physical cores are actually running the scheduler (1..=max).
Cores at or above this index park in a low-power wait loop instead of pulling
tasks, which is how a chip with more cores than you want to use is tamed. The
value is validated against crate::smp::max_cores at init.
Implementations§
Source§impl KernelConfig
impl KernelConfig
pub const fn default_const() -> Self
Trait Implementations§
Source§impl Clone for KernelConfig
impl Clone for KernelConfig
impl Copy for KernelConfig
Auto Trait Implementations§
impl Forget for KernelConfig
impl Freeze for KernelConfig
impl Move for KernelConfig
impl RefUnwindSafe for KernelConfig
impl Send for KernelConfig
impl Sync for KernelConfig
impl Unpin for KernelConfig
impl UnsafeUnpin for KernelConfig
impl UnwindSafe for KernelConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more