Index: kernel/generic/src/proc/scheduler.c
===================================================================
--- kernel/generic/src/proc/scheduler.c	(revision deed5101075d16614c9dfa62829d531701a50a20)
+++ kernel/generic/src/proc/scheduler.c	(revision bea6233f6403a8326263792f1a531eb1cb564552)
@@ -187,5 +187,4 @@
 
 loop:
-
 	if (atomic_load(&CPU->nrdy) == 0) {
 		/*
@@ -197,13 +196,14 @@
 		CPU->idle = true;
 		irq_spinlock_unlock(&CPU->lock, false);
-		interrupts_enable();
 
 		/*
-		 * An interrupt might occur right now and wake up a thread.
-		 * In such case, the CPU will continue to go to sleep
-		 * even though there is a runnable thread.
+		 * Go to sleep with interrupts enabled.
+		 * Ideally, this should be atomic, but this is not guaranteed on
+		 * all platforms yet, so it is possible we will go sleep when
+		 * a thread has just become available.
 		 */
-		cpu_sleep();
-		interrupts_disable();
+		cpu_interruptible_sleep();
+
+		/* Interrupts are disabled again. */
 		goto loop;
 	}
