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:
Anas Nashif 2024-02-24 11:37:56 -05:00
commit 868f099d61
3 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

@ -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;
}

View file

@ -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) {