kernel/thread: Initialize pended_on field of struct thread_base

This got missed, leaving garbage there for restarted threads to trip
on.  Actually I see multiple uninitialized fields, which seems odd.
This code deserves some rework, thread initialization isn't a
performance path and we should probably be zeroing the struct out.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2021-02-18 17:38:07 -08:00 committed by Anas Nashif
commit 8e16012ab7

View file

@ -800,7 +800,7 @@ void z_init_thread_base(struct _thread_base *thread_base, int priority,
uint32_t initial_state, unsigned int options)
{
/* k_q_node is initialized upon first insertion in a list */
thread_base->pended_on = NULL;
thread_base->user_options = (uint8_t)options;
thread_base->thread_state = (uint8_t)initial_state;