mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-12 22:17:11 -04:00
Add a way to check interrupts
This commit is contained in:
parent
49fb72a105
commit
e0ac3d81f7
@ -28,6 +28,11 @@ inline void enable_hwint(size_t& rflags){
|
||||
asm volatile("push %0; popfq; " :: "g" (rflags));
|
||||
}
|
||||
|
||||
inline bool interrupts_enabled(){
|
||||
auto flags = get_rflags();
|
||||
return flags & 0x200;
|
||||
}
|
||||
|
||||
} //enf of arch namespace
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user