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
|
@ -123,10 +123,8 @@ int k_sem_group_take(struct k_sem *sem_array[], struct k_sem **sem,
|
|||
_current->base.swap_data = &list;
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
wait_objects[i].dummy.flags = K_DUMMY;
|
||||
wait_objects[i].dummy.prio = priority;
|
||||
|
||||
_init_thread_timeout((struct k_thread *)&wait_objects[i].dummy);
|
||||
_init_thread_base(&wait_objects[i].dummy, priority, K_DUMMY, 0);
|
||||
|
||||
sys_dlist_append(&list, &wait_objects[i].desc.semg_node);
|
||||
wait_objects[i].desc.thread = _current;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue