1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
//! Virtual interrupts
use slos::clock;
/// A virtual interrupt
#[derive(Debug)]
pub enum HostedInterrupt {
/// Clock tick interrupt
ClockTick,
}
impl HostedInterrupt {
/// Perform handling for `self` as an interrupt
pub fn dispatch(&self) {
match self {
Self::ClockTick => {
clock::on_tick();
}
}
}
}