From: Chunwei Chen Date: Wed, 7 May 2014 17:57:19 +0000 (-0700) Subject: Linux 3.15 compat: NICE_TO_PRIO and PRIO_TO_NICE X-Git-Tag: zfs-0.8.0-rc1~152^2~229 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1538f4b6e3cc08c334f58b0025aa7de1d6c97e1a;p=zfs 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 Signed-off-by: Brian Behlendorf Issue #355 --- diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h index 1ac49b4f0..e73c7fd1e 100644 --- a/include/sys/sysmacros.h +++ b/include/sys/sysmacros.h @@ -95,8 +95,12 @@ #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 */