Struct r3::kernel::interrupt::InterruptHandlerDefiner
source · pub struct InterruptHandlerDefiner<System>where
System: KernelInterruptLine,{ /* private fields */ }
Expand description
The definer (static builder) for StaticInterruptHandler
.
Implementations§
source§impl<System> InterruptHandlerDefiner<System>where
System: KernelInterruptLine,
impl<System> InterruptHandlerDefiner<System>where System: KernelInterruptLine,
sourcepub const fn start<C>(self, start: C) -> InterruptHandlerDefiner<System>where
C: IntoClosureConst,
pub const fn start<C>(self, start: C) -> InterruptHandlerDefiner<System>where C: IntoClosureConst,
[Required] Specify the entry point.
sourcepub const fn line(self, line: usize) -> InterruptHandlerDefiner<System>
pub const fn line(self, line: usize) -> InterruptHandlerDefiner<System>
[Required] Specify the interrupt line to attach the interrupt handler to.
sourcepub const fn priority(self, priority: i32) -> InterruptHandlerDefiner<System>
pub const fn priority(self, priority: i32) -> InterruptHandlerDefiner<System>
Specify the priority. Defaults to 0
when unspecified.
When multiple handlers are registered to a single interrupt line, those with smaller priority values will execute earlier.
This should not be confused with an interrupt line’s priority.
sourcepub const unsafe fn unmanaged(self) -> InterruptHandlerDefiner<System>
pub const unsafe fn unmanaged(self) -> InterruptHandlerDefiner<System>
Indicate that the entry point function is unmanaged-safe (designed to execute as an unmanaged interrupt handler).
If an interrupt line is not configured with an initial priority value that falls within a managed range, configuration will fail unless all of its attached interrupt handlers are marked as unmanaged-safe.
Safety
The behavior of system calls is undefined in an unmanaged interrupt handler.
sourcepub const fn finish<C>(
self,
cfg: &mut Cfg<'_, C>
) -> StaticInterruptHandler<System>where
C: CfgInterruptLine<System = System>,
pub const fn finish<C>( self, cfg: &mut Cfg<'_, C> ) -> StaticInterruptHandler<System>where C: CfgInterruptLine<System = System>,
Complete the registration of an interrupt handler, returning an
StaticInterruptHandler
object.