Linux 3.15 compat: NICE_TO_PRIO and PRIO_TO_NICE

These macro's were exposed to make them available to other
parts of the kernel and modules.

References:
  torvalds/linux@6b6350f

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #355
This commit is contained in:
Chunwei Chen 2014-05-07 10:57:19 -07:00 committed by Brian Behlendorf
parent 703371d8c7
commit 1538f4b6e3
1 changed files with 4 additions and 0 deletions

View File

@ -95,8 +95,12 @@
#define minclsyspri (MAX_RT_PRIO) #define minclsyspri (MAX_RT_PRIO)
#define maxclsyspri (MAX_PRIO-1) #define maxclsyspri (MAX_PRIO-1)
#ifndef NICE_TO_PRIO
#define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) #define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20)
#endif
#ifndef PRIO_TO_NICE
#define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) #define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20)
#endif
/* Missing macros /* Missing macros
*/ */