Index: kernel/arch/mips32/include/asm.h
===================================================================
--- kernel/arch/mips32/include/asm.h	(revision f34c09e61b0dcd26b75a69a6c7553bc1433f6a2c)
+++ kernel/arch/mips32/include/asm.h	(revision b7aa7c5f7b8dd8691248edf3448104d343c42a2b)
@@ -74,5 +74,5 @@
 extern void interrupts_restore(ipl_t ipl);
 extern ipl_t interrupts_read(void);
-extern void asm_delay_loop(uint32_t t);
+extern bool interrupts_disabled(void);
 
 static inline void pio_write_8(ioport8_t *port, uint8_t v)
Index: kernel/arch/mips32/src/interrupt.c
===================================================================
--- kernel/arch/mips32/src/interrupt.c	(revision f34c09e61b0dcd26b75a69a6c7553bc1433f6a2c)
+++ kernel/arch/mips32/src/interrupt.c	(revision b7aa7c5f7b8dd8691248edf3448104d343c42a2b)
@@ -89,4 +89,14 @@
 }
 
+/** Check interrupts state.
+ *
+ * @return True if interrupts are disabled.
+ *
+ */
+bool interrupts_disabled(void)
+{
+	return !(cp0_status_read() & cp0_status_ie_enabled_bit);
+}
+
 /* TODO: This is SMP unsafe!!! */
 uint32_t count_hi = 0;
