Commit 7e298d60 authored by Dongsheng Yang's avatar Dongsheng Yang Committed by Ingo Molnar
Browse files

sched/prio: Use DEFAULT_PRIO to define NICE_TO_PRIO() and PRIO_TO_NICE()

There is already a macro named DEFAULT_PRIO in prio.h, we can use it
to define NICE_TO_PRIO and PRIO_TO_NICE rather than use hard coding
of (MAX_RT_PRIO + 20).
Signed-off-by: default avatarDongsheng Yang <>
Signed-off-by: default avatarPeter Zijlstra <>

Signed-off-by: default avatarThomas Gleixner <>
Signed-off-by: default avatarIngo Molnar <>
parent 11c785b7
......@@ -25,8 +25,8 @@
* to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
* and back.
#define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20)
#define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20)
#define NICE_TO_PRIO(nice) ((nice) + DEFAULT_PRIO)
#define PRIO_TO_NICE(prio) ((prio) - DEFAULT_PRIO)
* 'User priority' is the nice value converted to something we
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment