kernel: thread: rename is_metairq

Trivial rename of is_metairq to thread_is_metairq.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2024-03-28 07:15:04 -04:00
parent 0b473ce925
commit 17c874f4fc
2 changed files with 5 additions and 5 deletions

View file

@ -56,7 +56,7 @@ static inline int is_preempt(struct k_thread *thread)
}
static inline int is_metairq(struct k_thread *thread)
static inline int thread_is_metairq(struct k_thread *thread)
{
#if CONFIG_NUM_METAIRQ_PRIORITIES > 0
return (thread->base.prio - K_HIGHEST_THREAD_PRIO)
@ -209,7 +209,7 @@ static ALWAYS_INLINE bool should_preempt(struct k_thread *thread,
/* Otherwise we have to be running a preemptible thread or
* switching to a metairq
*/
if (is_preempt(_current) || is_metairq(thread)) {
if (is_preempt(_current) || thread_is_metairq(thread)) {
return true;
}

View file

@ -248,7 +248,7 @@ static ALWAYS_INLINE struct k_thread *next_up(void)
*/
struct k_thread *mirqp = _current_cpu->metairq_preempted;
if (mirqp != NULL && (thread == NULL || !is_metairq(thread))) {
if (mirqp != NULL && (thread == NULL || !thread_is_metairq(thread))) {
if (!z_is_thread_prevented_from_running(mirqp)) {
thread = mirqp;
} else {
@ -333,11 +333,11 @@ static void update_metairq_preempt(struct k_thread *thread)
{
#if (CONFIG_NUM_METAIRQ_PRIORITIES > 0) && \
(CONFIG_NUM_COOP_PRIORITIES > CONFIG_NUM_METAIRQ_PRIORITIES)
if (is_metairq(thread) && !is_metairq(_current) &&
if (thread_is_metairq(thread) && !thread_is_metairq(_current) &&
!is_preempt(_current)) {
/* Record new preemption */
_current_cpu->metairq_preempted = _current;
} else if (!is_metairq(thread) && !z_is_idle_thread_object(thread)) {
} else if (!thread_is_metairq(thread) && !z_is_idle_thread_object(thread)) {
/* Returning from existing preemption */
_current_cpu->metairq_preempted = NULL;
}