Subject: Re: Magnum...
To: Wayne Knowles <w.knowles@niwa.cri.nz>
From: Mark Abene <phiber@radicalmedia.com>
List: port-mips
Date: 02/06/2001 09:46:15
On Tue, Feb 06, 2001 at 10:56:07PM +1300, Wayne Knowles wrote:
>
> Hi Mark,
>
> By the sounds of it the hardintr() function isn't being called, or the
> microtime() function is doing something weird.
>
> Taking a look at the code I see that the hardintr() function is called
> only if the clock_started variable has been set. This is only specific
> for the MAGNUM and is set in cpu_initclocks(). I assume that you have
> checked this variable has been set correctly.
>
> You might be able to get a better handle on what is happening by adding
> the following debug printf to the end of the microtime() function
>
> printf("tv_sec=%ld, tv_usec=%ld\n", tvp->tv_sec, tvp->tv_usec);
>
...
You were right, something is wrong with microtime. I inserted a printf after
the call to microtime in kern_synch.c:ltsleep() and the first time around,
(while the process is still sleeping), I got "60" for sec, and "0" for usec!
The next time around, when the process should wake up, I got "60" again for
sec, and "1" for usec. Then things lock solid.
It would seem that the timeval is not being properly populated.
I'll see what I can find...
-Mark