diff --git a/kernel/src/arch/CPU.h b/kernel/src/arch/CPU.h index edf51cba..1701057f 100644 --- a/kernel/src/arch/CPU.h +++ b/kernel/src/arch/CPU.h @@ -25,4 +25,6 @@ namespace CPU void print_stack_trace(); void get_stack_trace_at(Registers* regs, void (*callback)(u64, void*), void* arg); void print_stack_trace_at(Registers* regs); + + void pause(); } \ No newline at end of file diff --git a/kernel/src/arch/x86_64/CPU.cpp b/kernel/src/arch/x86_64/CPU.cpp index 11043411..dd63b84d 100644 --- a/kernel/src/arch/x86_64/CPU.cpp +++ b/kernel/src/arch/x86_64/CPU.cpp @@ -506,6 +506,11 @@ namespace CPU }, &frame_index); } + + void pause() + { + asm volatile("pause"); + } } // called by kernel_yield