From 4d8d745ab899b767737883809b89f4e50b87172e Mon Sep 17 00:00:00 2001 From: chrysn Date: Wed, 25 Jan 2023 14:57:34 +0100 Subject: [PATCH] thread: Terminating threads go to zombie state instead of stopped --- core/sched.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/sched.c b/core/sched.c index 236c58e764..7265ef9772 100644 --- a/core/sched.c +++ b/core/sched.c @@ -319,10 +319,7 @@ NORETURN void sched_task_exit(void) sched_threads[thread_getpid()] = NULL; sched_num_threads--; - sched_set_status(thread_get_active(), STATUS_STOPPED); - - sched_active_thread = NULL; - cpu_switch_context_exit(); + thread_zombify(); } #ifdef MODULE_SCHED_CB