From 50a533f7a5df4dbe37140c75bb1560d28c4681c5 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Wed, 10 May 2017 10:31:33 -0700 Subject: [PATCH] kernel: init: mark initial dummy thread The initial dummy thread context used for the initial __swap to the main thread at early kernel initialization was not marked as a dummy thread as it ought to be. Signed-off-by: Andrew Boie --- kernel/init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/init.c b/kernel/init.c index 593e03f7f1d..cfed8b54ec2 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -242,6 +242,7 @@ static void prepare_multithreading(struct k_thread *dummy_thread) _current = dummy_thread; dummy_thread->base.user_options = K_ESSENTIAL; + dummy_thread->base.thread_state = _THREAD_DUMMY; #endif /* _kernel.ready_q is all zeroes */