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:
parent
0b473ce925
commit
17c874f4fc
|
@ -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
|
#if CONFIG_NUM_METAIRQ_PRIORITIES > 0
|
||||||
return (thread->base.prio - K_HIGHEST_THREAD_PRIO)
|
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
|
/* Otherwise we have to be running a preemptible thread or
|
||||||
* switching to a metairq
|
* switching to a metairq
|
||||||
*/
|
*/
|
||||||
if (is_preempt(_current) || is_metairq(thread)) {
|
if (is_preempt(_current) || thread_is_metairq(thread)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ static ALWAYS_INLINE struct k_thread *next_up(void)
|
||||||
*/
|
*/
|
||||||
struct k_thread *mirqp = _current_cpu->metairq_preempted;
|
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)) {
|
if (!z_is_thread_prevented_from_running(mirqp)) {
|
||||||
thread = mirqp;
|
thread = mirqp;
|
||||||
} else {
|
} else {
|
||||||
|
@ -333,11 +333,11 @@ static void update_metairq_preempt(struct k_thread *thread)
|
||||||
{
|
{
|
||||||
#if (CONFIG_NUM_METAIRQ_PRIORITIES > 0) && \
|
#if (CONFIG_NUM_METAIRQ_PRIORITIES > 0) && \
|
||||||
(CONFIG_NUM_COOP_PRIORITIES > CONFIG_NUM_METAIRQ_PRIORITIES)
|
(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)) {
|
!is_preempt(_current)) {
|
||||||
/* Record new preemption */
|
/* Record new preemption */
|
||||||
_current_cpu->metairq_preempted = _current;
|
_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 */
|
/* Returning from existing preemption */
|
||||||
_current_cpu->metairq_preempted = NULL;
|
_current_cpu->metairq_preempted = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue