hw_x86_64: Use PAUSE instruction in wait_for_interrupt

Add spin loop hint by means of the PAUSE instruction since
wait_for_interrupt is called in a busy loop. This should improve processor
performance and reduce power consumption.

Note: HLT cannot be used since it is a privileged instruction and the idle
      thread is executed in userspace.
This commit is contained in:
Adrian-Ken Rueegsegger 2015-07-02 12:10:32 +02:00 committed by Christian Helmuth
parent 2a0b6fb541
commit 780863007d

View File

@ -404,7 +404,7 @@ class Genode::Cpu
/** /**
* Wait for the next interrupt as cheap as possible * Wait for the next interrupt as cheap as possible
*/ */
static void wait_for_interrupt() { } static void wait_for_interrupt() { asm volatile ("pause"); }
/** /**
* Return wether to retry an undefined user instruction after this call * Return wether to retry an undefined user instruction after this call