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
|
@ -124,14 +124,11 @@ void _new_thread(char *pStackMem, size_t stackSize,
|
|||
pInitCtx->status32 = _ARC_V2_STATUS32_E(_ARC_V2_DEF_IRQ_LEVEL);
|
||||
#endif
|
||||
|
||||
/* k_q_node initialized upon first insertion in a list */
|
||||
thread->base.flags = options | K_PRESTART;
|
||||
thread->base.sched_locked = 0;
|
||||
_init_thread_base(&thread->base, priority, K_PRESTART, options);
|
||||
|
||||
/* static threads overwrite them afterwards with real values */
|
||||
thread->init_data = NULL;
|
||||
thread->fn_abort = NULL;
|
||||
thread->base.prio = priority;
|
||||
|
||||
#ifdef CONFIG_THREAD_CUSTOM_DATA
|
||||
/* Initialize custom data field (value is opaque to kernel) */
|
||||
|
@ -158,8 +155,6 @@ void _new_thread(char *pStackMem, size_t stackSize,
|
|||
thread->callee_saved.sp =
|
||||
(uint32_t)pInitCtx - ___callee_saved_stack_t_SIZEOF;
|
||||
|
||||
_nano_timeout_thread_init(thread);
|
||||
|
||||
/* initial values in all other regs/k_thread entries are irrelevant */
|
||||
|
||||
thread_monitor_init(thread);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue