xref: /DragonOS/kernel/src/arch/x86_64/interrupt/mod.rs (revision 882f0b7e7498dbff8de527b2b9159b7f6e6359c9)
1 #![allow(dead_code)]
2 use core::arch::asm;
3 
4 /// @brief 关闭中断
5 #[inline]
6 pub fn cli(){
7     unsafe{
8         asm!("cli");
9     }
10 }
11 
12 /// @brief 开启中断
13 #[inline]
14 pub fn sti(){
15     unsafe{
16         asm!("sti");
17     }
18 }