diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-23 14:05:01 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-23 14:05:01 +0000 |
commit | f3627cbe9236a062012c836f3b6ee311b43f63f2 (patch) | |
tree | ae854838b9a73b35bd0f3b8f42e5fb7f9cb1d5a9 /kernel/sys.c | |
parent | fea12a7b3f20bc135ab533491411e9ff753c01c8 (diff) |
Merge with Linux 2.4.0-test5-pre4.
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 86827f285..2e6b84fa7 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -234,8 +234,9 @@ asmlinkage long sys_setpriority(int which, int who, int niceval) /* * Ugh. To avoid negative return values, "getpriority()" will - * not return the normal nice-value, but a value that has been - * offset by 20 (ie it returns 0..39 instead of -20..19) + * not return the normal nice-value, but a negated value that + * has been offset by 20 (ie it returns 40..1 instead of -20..19) + * to stay compatible. */ asmlinkage long sys_getpriority(int which, int who) { @@ -247,11 +248,11 @@ asmlinkage long sys_getpriority(int which, int who) read_lock(&tasklist_lock); for_each_task (p) { - unsigned niceval; + long niceval; if (!proc_sel(p, which, who)) continue; niceval = 20 - p->nice; - if (niceval < (unsigned)retval) + if (niceval > retval) retval = niceval; } read_unlock(&tasklist_lock); |