Kernel: Move interrupt status functions to kernel/Interrupts.h

This commit is contained in:
2024-03-01 01:32:33 +02:00
parent 65c4f9db5b
commit 02ad199138
7 changed files with 54 additions and 33 deletions

View File

@@ -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);
}
}