* [PATCH] sched/rt: Add a comment for the existence of task_is_realtime()
@ 2023-01-23 4:27 Davidlohr Bueso
0 siblings, 0 replies; only message in thread
From: Davidlohr Bueso @ 2023-01-23 4:27 UTC (permalink / raw)
To: tglx; +Cc: bigeasy, dave, linux-rt-users, linux-kernel
... such that users don't wonder about it when we have rt_task().
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
include/linux/sched/rt.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h
index 994c25640e15..7a5003c2cf2a 100644
--- a/include/linux/sched/rt.h
+++ b/include/linux/sched/rt.h
@@ -18,6 +18,12 @@ static inline int rt_task(struct task_struct *p)
return rt_prio(p->prio);
}
+/*
+ * Returns true if a task has elevated priority which is the case
+ * for RT tasks (SCHED_RR and SCHED_FIFO) as well as SCHED_DEADLINE.
+ * A task which runs at RT priority due to PI-boosting is not
+ * considered as one with elevated priority.
+ */
static inline bool task_is_realtime(struct task_struct *tsk)
{
int policy = tsk->policy;
--
2.39.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-23 4:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-23 4:27 [PATCH] sched/rt: Add a comment for the existence of task_is_realtime() Davidlohr Bueso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.