aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86_64/interrupt/mod.rs
blob: 3a617e8fd2b8f87b610d8f5d492c21d9eba07038 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pub mod pic_8259;
pub mod pit;
use crate::io::*;
use core::arch::asm;

#[no_mangle]
extern "C" fn guardian(slot: u16) {
	println!("interrupt received {:x}", slot);
}

#[inline(always)]
pub fn interrupt_enable() {
	unsafe {
		asm!("sti");
	}
}

#[inline(always)]
pub fn interrupt_disable() {
	unsafe {
		asm!("cli");
	}
}