Skip to contentSkip to conversation

sched/rt: Add a comment for the existence of task_is_realtime()

PATCH New Davidlohr Bueso 1 participant 1 message Jan 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/rt: Add a comment for the existence of task_is_realtime()

... such that users don't wonder about it when we have rt_task().

---
 include/linux/sched/rt.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/linux/sched/rt.h +6 -0
index 994c25640e15..7a5003c2cf2a 100644
@@ -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;
Signature · 1 line
2.39.0