]> granicus.if.org Git - zfs/commitdiff
Linux 3.15 compat: NICE_TO_PRIO and PRIO_TO_NICE
authorChunwei Chen <tuxoko@gmail.com>
Wed, 7 May 2014 17:57:19 +0000 (10:57 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 7 May 2014 20:38:03 +0000 (13:38 -0700)
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

include/sys/sysmacros.h

index 1ac49b4f0c1e9b554e8e77b0965ecd28b0774eae..e73c7fd1e89f3c9afac177d73f6ed2216f8c9601 100644 (file)
 #define minclsyspri                    (MAX_RT_PRIO)
 #define maxclsyspri                    (MAX_PRIO-1)
 
+#ifndef NICE_TO_PRIO
 #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)
+#endif
 
 /* Missing macros
  */