aboutsummaryrefslogtreecommitdiff
path: root/arch/i386/sys/control.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/sys/control.h')
-rw-r--r--arch/i386/sys/control.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/i386/sys/control.h b/arch/i386/sys/control.h
new file mode 100644
index 0000000..89ab067
--- /dev/null
+++ b/arch/i386/sys/control.h
@@ -0,0 +1,24 @@
+#pragma once
+
+static __inline__ void
+abort()
+{
+ /* Symbol h is already defined?
+__asm__(R"(cli
+h: hlt
+jmp h)");
+*/
+ __asm__("cli; hlt");
+}
+
+static __inline__ void
+enable_interrupts()
+{
+ __asm__("sti");
+}
+
+static __inline__ void
+disable_interrupts()
+{
+ __asm__("cli");
+}