Kernel: Move interrupt status functions to kernel/Interrupts.h
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define DISABLE_INTERRUPTS() asm volatile("cli")
|
||||
#define ENABLE_INTERRUPTS() asm volatile("sti")
|
||||
|
||||
namespace Kernel
|
||||
{
|
||||
|
||||
@@ -51,11 +48,4 @@ namespace Kernel
|
||||
bool m_using_apic { false };
|
||||
};
|
||||
|
||||
inline bool interrupts_enabled()
|
||||
{
|
||||
uintptr_t flags;
|
||||
asm volatile("pushf; pop %0" : "=r"(flags) :: "memory");
|
||||
return flags & (1 << 9);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user