diff options
author | aqua <aqua@iserlohn-fortress.net> | 2024-03-08 17:24:49 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2024-03-08 22:00:07 +0200 |
commit | 20b97ea7c0dbbdc13800e12ff5c86c00c4a342ec (patch) | |
tree | 473281e5fc8b256827ce1a678573444e1aa5f669 /arch/i386/sys/control.h | |
parent | Generate src/conf.h (diff) | |
download | kernel-20b97ea7c0dbbdc13800e12ff5c86c00c4a342ec.tar.xz |
Bazel build
Diffstat (limited to 'arch/i386/sys/control.h')
-rw-r--r-- | arch/i386/sys/control.h | 24 |
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"); +} |