From 5d988c088f6c5cedd84659796fb6d856ad0c0b4f Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 7 Dec 2022 14:46:56 +0100 Subject: [PATCH] Make idle_loop noreturn --- kernel/src/arch/CPU.h | 2 +- kernel/src/arch/x86_64/CPU.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/src/arch/CPU.h b/kernel/src/arch/CPU.h index 9d973a3d..0021fea8 100644 --- a/kernel/src/arch/CPU.h +++ b/kernel/src/arch/CPU.h @@ -13,7 +13,7 @@ namespace CPU [[noreturn]] void efficient_halt(); - void idle_loop(); + [[noreturn]] void idle_loop(); void switch_kernel_stack(u64 top); diff --git a/kernel/src/arch/x86_64/CPU.cpp b/kernel/src/arch/x86_64/CPU.cpp index 8a9346fb..40e86dc6 100644 --- a/kernel/src/arch/x86_64/CPU.cpp +++ b/kernel/src/arch/x86_64/CPU.cpp @@ -430,7 +430,7 @@ namespace CPU goto loop; // Safeguard: if we ever wake up, start our low-power rest again } - void idle_loop() + [[noreturn]] void idle_loop() { asm volatile("sti"); loop: