From 6077ad2b7b1b71514f60fea5a49e7255d876bf50 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 23 May 2020 23:48:56 +0000 Subject: [PATCH] scst/include/backport.h: Backport the MIN_NICE definition git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8979 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scst/include/backport.h b/scst/include/backport.h index 2b774a8a9..1b730cc41 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1401,6 +1401,17 @@ static inline void sg_unmark_end(struct scatterlist *sg) #define set_cpus_allowed_ptr(p, new_mask) set_cpus_allowed((p), *(new_mask)) #endif +/* */ + +/* + * See also commit 3ee237dddcd8 ("sched/prio: Add 3 macros of MAX_NICE, + * MIN_NICE and NICE_WIDTH in prio.h") # v3.15. + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7) +#define MIN_NICE -20 +#endif + /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)