Commit e212743b authored by Andrea Righi's avatar Andrea Righi Committed by Tejun Heo
Browse files

sched_ext: Make scx_rq_bypassing() inline



scx_rq_bypassing() is used both from ext.c and ext_idle.c, move it to
ext.h as a static inline function.

No functional changes.

Signed-off-by: default avatarAndrea Righi <arighi@nvidia.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 353656eb
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -1701,11 +1701,6 @@ static bool scx_tryset_enable_state(enum scx_enable_state to,
	return atomic_try_cmpxchg(&scx_enable_state_var, &from_v, to);
}

static bool scx_rq_bypassing(struct rq *rq)
{
	return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
}

/**
 * wait_ops_state - Busy-wait the specified ops state to end
 * @p: target task
+5 −0
Original line number Diff line number Diff line
@@ -13,6 +13,11 @@ static inline bool scx_kf_allowed_if_unlocked(void)
	return !current->scx.kf_mask;
}

static inline bool scx_rq_bypassing(struct rq *rq)
{
	return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
}

DECLARE_STATIC_KEY_FALSE(scx_ops_allow_queued_wakeup);

void scx_tick(struct rq *rq);