kernel: streamline initialization of _thread_base and timeouts
Move _thread_base initialization to _init_thread_base(), remove mention of "nano" in timeouts init and move timeout init to _init_thread_base(). Initialize all base fields via the _init_thread_base in semaphore groups code. Change-Id: I05b70b06261f4776bda6d67f358190428d4a954a Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
50eb51a745
commit
069fd3624e
9 changed files with 32 additions and 43 deletions
|
@ -112,14 +112,11 @@ void _new_thread(char *pStackMem, size_t stackSize,
|
|||
pInitCtx->xpsr =
|
||||
0x01000000UL; /* clear all, thumb bit is 1, even if RO */
|
||||
|
||||
/* k_q_node initialized upon first insertion in a list */
|
||||
tcs->base.flags = options | K_PRESTART;
|
||||
tcs->base.sched_locked = 0;
|
||||
_init_thread_base(&tcs->base, priority, K_PRESTART, options);
|
||||
|
||||
/* static threads overwrite it afterwards with real value */
|
||||
tcs->init_data = NULL;
|
||||
tcs->fn_abort = NULL;
|
||||
tcs->base.prio = priority;
|
||||
|
||||
#ifdef CONFIG_THREAD_CUSTOM_DATA
|
||||
/* Initialize custom data field (value is opaque to kernel) */
|
||||
|
@ -140,8 +137,6 @@ void _new_thread(char *pStackMem, size_t stackSize,
|
|||
|
||||
/* swap_return_value can contain garbage */
|
||||
|
||||
_nano_timeout_thread_init(tcs);
|
||||
|
||||
/* initial values in all other registers/TCS entries are irrelevant */
|
||||
|
||||
thread_monitor_init(tcs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue