Kernel/riscv64: Implement Processor::pause

This commit is contained in:
Sönke Holz 2024-02-27 01:20:10 +01:00 committed by Andrew Kaster
commit 58a2e6412c
Notes: sideshowbarker 2024-07-17 07:38:17 +09:00

View file

@ -196,7 +196,9 @@ ALWAYS_INLINE Thread* ProcessorBase<T>::current_thread()
template<typename T>
ALWAYS_INLINE void ProcessorBase<T>::pause()
{
TODO_RISCV64();
// FIXME: Use the pause instruction directly (via .option arch, +zihintpause)
// when we upgrade our toolchain to clang 17
asm volatile(".word 0x0100000f");
}
template<typename T>