From 580f30e520208a4a5810666188298ce3248a666c Mon Sep 17 00:00:00 2001 From: David Teller Date: Tue, 25 Oct 2016 00:03:03 +0200 Subject: [PATCH] Documenting use of `enable_and_halt()`. (#21) --- lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib.rs b/lib.rs index 87a9b52..5da383d 100644 --- a/lib.rs +++ b/lib.rs @@ -178,6 +178,7 @@ pub extern fn kmain(cpus: usize) { if context::switch() { interrupt::enable_and_nop(); } else { + // Enable interrupts, then halt CPU (to save power) until the next interrupt is actually fired. interrupt::enable_and_halt(); } }