Add a way to check interrupts

This commit is contained in:
Baptiste Wicht 2014-04-07 20:00:26 +02:00
parent 49fb72a105
commit e0ac3d81f7

View File

@ -28,6 +28,11 @@ inline void enable_hwint(size_t& rflags){
asm volatile("push %0; popfq; " :: "g" (rflags)); asm volatile("push %0; popfq; " :: "g" (rflags));
} }
inline bool interrupts_enabled(){
auto flags = get_rflags();
return flags & 0x200;
}
} //enf of arch namespace } //enf of arch namespace
#endif #endif