This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
nice
- From: "Alfred M. Szmidt" <ams at kemisten dot nu>
- To: roland at redhat dot com, libc-alpha at sources dot redhat dot com,soeren dot d dot schulze at gmx dot de
- Date: Wed, 18 May 2005 02:15:36 +0200
- Subject: nice
- Reply-to: ams at kemisten dot nu
Roland, do you see any problems with the following patch? According
to Soeren, it fixes the coreutils test for nice.
2005-05-18 Sören D. Schulze <soeren.d.schulze@gmx.de>
* hurd/hurd/resource.h (MACH_PRIORITY_TO_NICE): Don't multiply with 2.
(NICE_TO_MACH_PRIORITY): Don't divide with 2.
diff -Naur build-tree/glibc-2.3.2/hurd/hurd/resource.h build-tree.orig/glibc-2.3.2/hurd/hurd/resource.h
--- build-tree/glibc-2.3.2/hurd/hurd/resource.h 2005-04-23 20:29:08.525077368 +0200
+++ build-tree.orig/glibc-2.3.2/hurd/hurd/resource.h 2001-07-07 21:20:57.000000000 +0200
@@ -43,8 +43,8 @@
/* Convert between Mach priority values and the priority
values used by getpriority, setpriority, and nice. */
+#define MACH_PRIORITY_TO_NICE(prio) ((prio) - 12)
+#define NICE_TO_MACH_PRIORITY(nice) (12 + (nice))
-#define MACH_PRIORITY_TO_NICE(prio) (2 * ((prio) - 12))
-#define NICE_TO_MACH_PRIORITY(nice) (12 + ((nice) / 2))