From bb16bd0a71a8e615441694b97813cda2f8ea8ff8 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Fri, 22 May 2026 00:11:54 +0000 Subject: thread termination cleanup --- kc/core/arch_thread.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'kc/core/arch_thread.c') diff --git a/kc/core/arch_thread.c b/kc/core/arch_thread.c index 8f5f8d3..19e8908 100644 --- a/kc/core/arch_thread.c +++ b/kc/core/arch_thread.c @@ -73,12 +73,9 @@ void *arch_idle_loop(void *) return nullptr; } -noreturn void arch_terminate_thread(void *result, struct kc_thread *thread) +noreturn void arch_terminate_thread(union kc_thread_result result, struct kc_thread *) { - thread->result = (union kc_thread_result){ .pointer = result }; - thread->status = TERMINATED; - thread->kernel_stack_pointer = thread->kernel_stack_head; - task_schedule(); + kct_terminate(result); for (;;) __asm__ ("hlt"); } -- cgit v1.3.1-1-g115d