[PATCH] Re: Compile Errors on 2.4.0-test3 final

From: t.n.vanderleeuw@chello.nl
Date: Tue Jul 11 2000 - 02:48:31 EST


> I believe this is in a file that everyone has compiled in, so pardon me for not

True, but I looked at the source (I get the same error) and for SMP
this function is empty.

I checked out the 'priority' field, and found out that it has been
renamed to 'nice'. So the fix is to rename the field in the code. Easy
as that :-) The #define 'DEF_PRIORITY' has been renamed to DEF_NICE.

My theory: Someone decided to rename the field, did so in sched.h, then
compiled their kernel to catch all uses of the field in code and rename
them.
Unfortunately, this way some places in UP-only code were overlooked!

Here's a patch:

--- kernel/timer.c.orig Tue Jul 11 09:00:31 2000
+++ kernel/timer.c Tue Jul 11 09:02:44 2000
@@ -577,7 +577,7 @@
                         p->counter = 0;
                         p->need_resched = 1;
                 }
- if (p->priority < DEF_PRIORITY)
+ if (p->nice < DEF_NICE)
                         kstat.cpu_nice += user_tick;
                 else
                         kstat.cpu_user += user_tick;

This made the kernel compile with my .config, however, you might come
across other places where p->priority is used! There is a patch from
Adam J. Richter that fixes many more places, and gives an explanation
of the change.

Note to Adam J. Richter:
I looked at the patch you posted, and I believe you left out this
instance of p->priority. :-)

--Tim

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:12 EST