[RFC PATCH 5/9] sched: export-GPL task_prio
From: Mathieu Desnoyers
Date: Thu Apr 09 2020 - 15:36:18 EST
Exporting the task_prio() symbol to GPL modules is useful for kernel
tracers implemented as kernel modules. It exports information which is
already available through /proc in a way which allows it to be sampled
by kernel tracers with low overhead.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
kernel/sched/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a2694ba82874..f87cffef317a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4629,6 +4629,7 @@ int task_prio(const struct task_struct *p)
{
return p->prio - MAX_RT_PRIO;
}
+EXPORT_SYMBOL_GPL(task_prio);
/**
* idle_cpu - is a given CPU idle currently?
--
2.17.1