pub struct Cfg<'c, C: CfgBase> { /* private fields */ }
Expand description
Wraps a raw_cfg::CfgBase
to provide higher-level services.
Implementations§
source§impl<'c, C: CfgBase> Cfg<'c, C>
impl<'c, C: CfgBase> Cfg<'c, C>
sourcepub const fn num_task_priority_levels(&mut self, new_value: usize)where
C: CfgBase,
pub const fn num_task_priority_levels(&mut self, new_value: usize)where C: CfgBase,
Specify the number of task priority levels.
The RAM consumption by task ready queues is expected to be proportional
to the number of task priority levels. In addition, the scheduler may be
heavily optimized for the cases where the number is very small (e.g., <
16
). This optimization can provide a significant performance
improvement if the target processor does not have a CTZ (count trailing
zero) instruction, barrel shifter, or hardware multiplier.
Kernels may set an arbitrary upper bound for the number of task priority levels.
sourcepub const fn finish_phase1(&mut self) -> CfgPhase1Data<C::System>where
C: CfgBase,
pub const fn finish_phase1(&mut self) -> CfgPhase1Data<C::System>where C: CfgBase,
Finalize self
for the phase 1 configuration.
This method constructs CfgPhase1Data
, which must be passed to
attach_phase1!
to proceed with the kernel-independent
configuration process.
sourcepub const fn finish_phase2(&mut self) -> CfgPhase2Data<C::System>where
C: CfgBase,
pub const fn finish_phase2(&mut self) -> CfgPhase2Data<C::System>where C: CfgBase,
Finalize self
for the phase 2 configuration.
This method constructs CfgPhase2Data
, which must be passed to
attach_phase2!
to proceed with the kernel-independent
configuration process.
sourcepub const fn finish_phase3_interrupt(&mut self)where
C: CfgInterruptLine,
C::System: CfgPhase2 + KernelInterruptLine,
pub const fn finish_phase3_interrupt(&mut self)where C: CfgInterruptLine, C::System: CfgPhase2 + KernelInterruptLine,
Perform additional finalization tasks for interrupt line configuration.
This method must be called before Self::finish_phase3
if C
implements CfgInterruptLine
.
sourcepub const fn finish_phase3(self) -> CfgPhase3Data<C::System>where
C: CfgBase,
C::System: CfgPhase2,
pub const fn finish_phase3(self) -> CfgPhase3Data<C::System>where C: CfgBase, C::System: CfgPhase2,
Finalize self
for the phase 3 configuration.
This method makes the last set of changes to the referenced C: impl CfgBase
. It also constructs CfgPhase3Data
, which must be passed to
attach_phase3!
to complete the kernel-independent configuration
process.