1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//! Basic interrupt handling structures and simple handler routines.

#![no_std]
#![cfg_attr(target_arch = "x86_64", feature(abi_x86_interrupt))]
#![cfg_attr(target_arch = "x86_64", allow(dead_code))]

#[cfg_attr(target_arch = "x86_64", path = "x86_64/mod.rs")]
#[cfg_attr(target_arch = "aarch64", path = "aarch64/mod.rs")]
mod arch;

pub use arch::*;

#[derive(Debug, PartialEq, Eq)]
#[repr(C)]
pub enum EoiBehaviour {
    /// The interrupt handler hasn't called the [`eoi`] function,
    /// in which case it will be called automatically once the
    /// handler returns.
    HandlerDidNotSendEoi,
    /// The interrupt handler has called the [`eoi`] function.
    HandlerSentEoi,
}