Index: kernel/arch/riscv64/include/arch/asm.h
===================================================================
--- kernel/arch/riscv64/include/arch/asm.h	(revision c030818c76c1190836935ae3d0c05760e3582537)
+++ kernel/arch/riscv64/include/arch/asm.h	(revision bb65ccb31c144be2b4feec192f1c785c3a4acde8)
@@ -95,6 +95,13 @@
 }
 
-_NO_TRACE static inline void cpu_sleep(void)
+/** Enables interrupts and blocks until an interrupt arrives,
+ * atomically if possible on target architecture.
+ * Disables interrupts again before returning to caller.
+ */
+_NO_TRACE static inline void cpu_interruptible_sleep(void)
 {
+	// FIXME: do this properly
+	interrupts_enable();
+	interrupts_disable();
 }
 
