This commit is contained in:
2026-09-14 02:50:35 +02:00
parent cf3f1f9e99
commit 9e5ed517bc
45 changed files with 210 additions and 212 deletions
+19
View File
@@ -0,0 +1,19 @@
#include <stdint.h>
#include <x86_64/defs.h>
bool arch_irq_get_state() {
uint64_t flags;
asm volatile("pushf; pop %0" : "=r"(flags)::"memory");
return flags & RFLAGS_IF;
}
void arch_irq_set_state(bool state) {
if (state)
asm volatile("sti");
else
asm volatile("cli");
}
void arch_irq_wait() {
asm volatile("hlt");
}