From 89118947edeb479d0dd1069f433673f34bb47c8b Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Mon, 8 Jul 2013 14:34:55 +0200 Subject: [PATCH] Fix Sortix::Scheduler::ExitThread not being noreturn. --- sortix/scheduler.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sortix/scheduler.h b/sortix/scheduler.h index c8630e32..1ec45ac7 100644 --- a/sortix/scheduler.h +++ b/sortix/scheduler.h @@ -33,7 +33,12 @@ namespace Scheduler { void Init(); void Switch(CPU::InterruptRegisters* regs); inline static void Yield() { asm volatile ("int $129"); } -inline static void ExitThread() { asm volatile ("int $132"); } +__attribute__ ((noreturn)) +inline static void ExitThread() +{ + asm volatile ("int $132"); + __builtin_unreachable(); +} void SetThreadState(Thread* thread, Thread::State state); Thread::State GetThreadState(Thread* thread); void SetIdleThread(Thread* thread);