unified: streamline "timeout abort" internal interface
Rename _do_timeout_abort to _abort_timeout, rename _timeout_abort to _abort_thread_timeout to better reflect their functionalities. Have the latter call the former, remove _do_timeout_abort and _nano_timer_timeout_abort. Change-Id: I0fea9474b19a2eb47a37489eb06c0d1d56886c9c Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
179fd3a80c
commit
7caef4581d
16 changed files with 29 additions and 34 deletions
|
@ -171,9 +171,11 @@ static int handle_sem_group(struct k_sem *sem, struct k_thread *thread)
|
|||
if (desc->sem != sem) {
|
||||
sem_thread = CONTAINER_OF(desc, struct _sem_thread,
|
||||
desc);
|
||||
struct k_thread *dummy_thread =
|
||||
(struct k_thread *)&sem_thread->dummy;
|
||||
|
||||
_timeout_abort((struct k_thread *)&sem_thread->dummy);
|
||||
_unpend_thread((struct k_thread *)&sem_thread->dummy);
|
||||
_abort_thread_timeout(dummy_thread);
|
||||
_unpend_thread(dummy_thread);
|
||||
|
||||
sys_dlist_remove(node);
|
||||
}
|
||||
|
@ -196,7 +198,7 @@ static int handle_sem_group(struct k_sem *sem, struct k_thread *thread)
|
|||
|
||||
if (!_is_thread_ready(desc->thread)) {
|
||||
_reset_thread_states(desc->thread, K_PENDING | K_TIMING);
|
||||
_timeout_abort(desc->thread);
|
||||
_abort_thread_timeout(desc->thread);
|
||||
if (_is_thread_ready(desc->thread)) {
|
||||
_add_thread_to_ready_q(desc->thread);
|
||||
}
|
||||
|
@ -230,7 +232,7 @@ static bool sem_give_common(struct k_sem *sem)
|
|||
return false;
|
||||
}
|
||||
|
||||
_timeout_abort(thread);
|
||||
_abort_thread_timeout(thread);
|
||||
|
||||
if (!handle_sem_group(sem, thread)) {
|
||||
/* Handle the non-group case */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue