Skip to main content

Registry

Struct Registry 

Source
pub struct Registry<O: IrqOps> { /* private fields */ }
Expand description

Dynamic IRQ registry.

Implementations§

Source§

impl<O: IrqOps> Registry<O>

Source

pub fn new(ops: O) -> Self

Creates an empty registry.

Source

pub fn request( &self, irq: IrqNumber, request: IrqRequest, ) -> Result<IrqHandle, IrqError>

Registers an IRQ action.

Source

pub fn free(&self, handle: IrqHandle) -> Result<(), IrqError>

Frees an IRQ action.

Source

pub fn enable(&self, handle: IrqHandle) -> Result<(), IrqError>

Enables an IRQ action and its backing line.

Source

pub fn disable(&self, handle: IrqHandle) -> Result<(), IrqError>

Disables an IRQ action and its backing line.

Source

pub fn status(&self, handle: IrqHandle) -> Result<IrqStatus, IrqError>

Returns a status snapshot for an IRQ action.

Source

pub fn dispatch(&self, irq: IrqNumber, cpu: CpuId) -> IrqOutcome

Dispatches an IRQ on the given CPU.

Source

pub fn cpu_online(&self, cpu: CpuId) -> Result<(), IrqError>

Marks a CPU online and applies pending per-CPU enables for that CPU.

Source

pub fn cpu_offline(&self, cpu: CpuId) -> Result<(), IrqError>

Marks a CPU offline from the framework’s perspective.

Trait Implementations§

Source§

impl<O: IrqOps + Send> Send for Registry<O>

Source§

impl<O: IrqOps + Send> Sync for Registry<O>

Auto Trait Implementations§

§

impl<O> !Freeze for Registry<O>

§

impl<O> !RefUnwindSafe for Registry<O>

§

impl<O> !UnwindSafe for Registry<O>

§

impl<O> Unpin for Registry<O>
where O: Unpin,

§

impl<O> UnsafeUnpin for Registry<O>
where O: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.