]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: map nice levels 1-to-1 with Mach prio levels
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 7 Feb 2015 21:09:09 +0000 (22:09 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 7 Feb 2015 21:09:09 +0000 (22:09 +0100)
ChangeLog
hurd/hurd/resource.h

index fa48858f524367388ed0c7273cc290d6bb6cc64e..03a987aa9e1e75646c51e6e0fb5f310cf98d9328 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,9 @@
        [__USE_MISC] (chflags, fchflags): Declare functions.
        * hurd/hurdselect.c (_hurd_select): In the poll case, do not return
        EINVAL when nfds is greater than FD_SETSIZE.
+       * hurd/hurd/resource.h (MACH_PRIORITY_TO_NICE,
+       NICE_TO_MACH_PRIORITY): Align nice levels on Mach priorities from 5 to
+       45.
 
 2015-02-06  Roland McGrath  <roland@hack.frob.com>
 
index e43d8e8b74972e1c6c8b1e9c8b1b8826ead04ad8..e9931e528a18d7b7395f6fd400177425800138da 100644 (file)
@@ -42,8 +42,8 @@ extern error_t _hurd_priority_which_map (enum __priority_which which, int who,
 
 /* Convert between Mach priority values and the priority
    values used by getpriority, setpriority, and nice.  */
-#define MACH_PRIORITY_TO_NICE(prio) (2 * ((prio) - 12))
-#define NICE_TO_MACH_PRIORITY(nice) (12 + ((nice) / 2))
+#define MACH_PRIORITY_TO_NICE(prio) ((prio) - 25)
+#define NICE_TO_MACH_PRIORITY(nice) ((nice) + 25)