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:
parent
6478735493
commit
8e16012ab7
1 changed files with 1 additions and 1 deletions
|
@ -800,7 +800,7 @@ void z_init_thread_base(struct _thread_base *thread_base, int priority,
|
||||||
uint32_t initial_state, unsigned int options)
|
uint32_t initial_state, unsigned int options)
|
||||||
{
|
{
|
||||||
/* k_q_node is initialized upon first insertion in a list */
|
/* 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->user_options = (uint8_t)options;
|
||||||
thread_base->thread_state = (uint8_t)initial_state;
|
thread_base->thread_state = (uint8_t)initial_state;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue