summaryrefslogtreecommitdiffstats
path: root/uisimulator/sdl/system-sdl.h
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl/system-sdl.h')
-rw-r--r--uisimulator/sdl/system-sdl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/uisimulator/sdl/system-sdl.h b/uisimulator/sdl/system-sdl.h
index c5e7d40560..08f702d01e 100644
--- a/uisimulator/sdl/system-sdl.h
+++ b/uisimulator/sdl/system-sdl.h
@@ -24,6 +24,19 @@
#define HIGHEST_IRQ_LEVEL 1
int set_irq_level(int level);
+
+#define disable_irq() \
+ ((void)set_irq_level(HIGHEST_IRQ_LEVEL))
+
+#define enable_irq() \
+ ((void)set_irq_level(0))
+
+#define disable_irq_save() \
+ set_irq_level(HIGHEST_IRQ_LEVEL)
+
+#define restore_irq(level) \
+ ((void)set_irq_level(level))
+
void sim_enter_irq_handler(void);
void sim_exit_irq_handler(void);
bool sim_kernel_init(void);