diff options
| author | Andrea Righi <arighi@nvidia.com> | 2025-05-15 21:11:42 +0200 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2025-05-20 10:23:50 -1000 |
| commit | 617a77018f683905ed4e8cd693df51243908353f (patch) | |
| tree | 13c684e2f7e8865514b3da43d3887a10a2b62036 /kernel/sched/ext.h | |
| parent | 3a453297582f066f1fc8acc287c7633b21bb12cc (diff) | |
sched_ext: Make scx_kf_allowed_if_unlocked() available outside ext.c
Relocate the scx_kf_allowed_if_unlocked(), so it can be used from other
source files (e.g., ext_idle.c).
No functional change.
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/sched/ext.h')
| -rw-r--r-- | kernel/sched/ext.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/sched/ext.h b/kernel/sched/ext.h index 3053cdd61eb9..6e5072f57771 100644 --- a/kernel/sched/ext.h +++ b/kernel/sched/ext.h @@ -8,6 +8,11 @@ */ #ifdef CONFIG_SCHED_CLASS_EXT +static inline bool scx_kf_allowed_if_unlocked(void) +{ + return !current->scx.kf_mask; +} + DECLARE_STATIC_KEY_FALSE(scx_ops_allow_queued_wakeup); void scx_tick(struct rq *rq); |