summaryrefslogtreecommitdiff
path: root/kc/core/arch_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'kc/core/arch_thread.c')
-rw-r--r--kc/core/arch_thread.c7
1 files changed, 2 insertions, 5 deletions
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");
}