From 58a2e6412cab7038626dc708979355ee6c937a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Holz?= Date: Tue, 27 Feb 2024 01:20:10 +0100 Subject: [PATCH] Kernel/riscv64: Implement Processor::pause --- Kernel/Arch/riscv64/Processor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Kernel/Arch/riscv64/Processor.h b/Kernel/Arch/riscv64/Processor.h index 6bce31b7827..1e0995aea3a 100644 --- a/Kernel/Arch/riscv64/Processor.h +++ b/Kernel/Arch/riscv64/Processor.h @@ -196,7 +196,9 @@ ALWAYS_INLINE Thread* ProcessorBase::current_thread() template ALWAYS_INLINE void ProcessorBase::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