Minor cleanup and a hack to idle the cpu in getc loops.
diff --git a/arch/x86/ops.S b/arch/x86/ops.S
index 17c08ae..9a97948 100644
--- a/arch/x86/ops.S
+++ b/arch/x86/ops.S
@@ -80,7 +80,13 @@
 
 /* void arch_idle(); */
 FUNCTION(arch_idle)
+	pushf
+	popl %eax
+	andl $0x200, %eax
+	test %eax, %eax
+	je 1f					/* don't halt if local interrupts are disabled */
 	hlt
+1:
 	ret
 
 /* void arch_switch_stacks_and_call(addr_t call, addr_t stack) */