mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
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:
parent
2a0b6fb541
commit
780863007d
@ -404,7 +404,7 @@ class Genode::Cpu
|
||||
/**
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user