kernel: sched: z_set_prio -> z_thread_prio_set
Rename private function to make it clear what priority we are setting and to be consistent across the code. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
477a04a098
commit
868f099d61
3 changed files with 4 additions and 4 deletions
|
@ -51,7 +51,7 @@ void z_reschedule_irqlock(uint32_t key);
|
|||
struct k_thread *z_unpend_first_thread(_wait_q_t *wait_q);
|
||||
void z_unpend_thread(struct k_thread *thread);
|
||||
int z_unpend_all(_wait_q_t *wait_q);
|
||||
bool z_set_prio(struct k_thread *thread, int prio);
|
||||
bool z_thread_prio_set(struct k_thread *thread, int prio);
|
||||
void *z_get_next_switch_handle(void *interrupted);
|
||||
void idle(void *unused1, void *unused2, void *unused3);
|
||||
void z_time_slice(void);
|
||||
|
|
|
@ -96,7 +96,7 @@ static bool adjust_owner_prio(struct k_mutex *mutex, int32_t new_prio)
|
|||
'y' : 'n',
|
||||
new_prio, mutex->owner->base.prio);
|
||||
|
||||
return z_set_prio(mutex->owner, new_prio);
|
||||
return z_thread_prio_set(mutex->owner, new_prio);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -987,7 +987,7 @@ void z_unpend_thread(struct k_thread *thread)
|
|||
/* Priority set utility that does no rescheduling, it just changes the
|
||||
* run queue state, returning true if a reschedule is needed later.
|
||||
*/
|
||||
bool z_set_prio(struct k_thread *thread, int prio)
|
||||
bool z_thread_prio_set(struct k_thread *thread, int prio)
|
||||
{
|
||||
bool need_sched = 0;
|
||||
|
||||
|
@ -1276,7 +1276,7 @@ void z_impl_k_thread_priority_set(k_tid_t thread, int prio)
|
|||
Z_ASSERT_VALID_PRIO(prio, NULL);
|
||||
__ASSERT(!arch_is_in_isr(), "");
|
||||
|
||||
bool need_sched = z_set_prio((struct k_thread *)thread, prio);
|
||||
bool need_sched = z_thread_prio_set((struct k_thread *)thread, prio);
|
||||
|
||||
flag_ipi();
|
||||
if (need_sched && _current->base.sched_locked == 0U) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue