Skip to main content

InterruptManager

Trait InterruptManager 

Source
pub trait InterruptManager {
    // Required methods
    fn create_group(
        &self,
        type_: InterruptSourceType,
        base: InterruptIndex,
        count: InterruptIndex,
    ) -> Result<Arc<Box<dyn InterruptSourceGroup>>>;
    fn destroy_group(
        &self,
        group: Arc<Box<dyn InterruptSourceGroup>>,
    ) -> Result<()>;
}
Expand description

Trait to manage interrupt sources for virtual device backends.

The InterruptManager implementations should protect itself from concurrent accesses internally, so it could be invoked from multi-threaded context.

Required Methods§

Source

fn create_group( &self, type_: InterruptSourceType, base: InterruptIndex, count: InterruptIndex, ) -> Result<Arc<Box<dyn InterruptSourceGroup>>>

Create an InterruptSourceGroup object to manage interrupt sources for a virtual device.

An InterruptSourceGroup object manages all interrupt sources of the same type for a virtual device.

§Arguments
  • type_: type of interrupt source.
  • base: base Interrupt Source ID to be managed by the group object.
  • count: number of Interrupt Sources to be managed by the group object.
Source

fn destroy_group(&self, group: Arc<Box<dyn InterruptSourceGroup>>) -> Result<()>

Destroy an InterruptSourceGroup object created by create_group().

Assume the caller takes the responsibility to disable all interrupt sources of the group before calling destroy_group(). This assumption helps to simplify InterruptSourceGroup implementations.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: InterruptManager> InterruptManager for Arc<T>

Implementors§