[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: load average patches for MiNT 1.10 + patches
michael smith writes:
> In <memo.602717@cix.compulink.co.uk> you wrote :
>
> >Ah but what I ment was, with-in the vbl routine don't increment your own
> >timer variable, but on startup take a snap shot of the _hz_200 var and
> >calculate your effitice time from that, thus at most you will only be 1/50
> >second out.
>
> Yes, and the system will have a maximum lifetime of a little over 120 days.
> (I know, it's not that stable _anyway_,
oh don't say that, my patched 1.09 kernel was quite stable... :) and
i think 1.10 is getting there too. (i can only talk for me of course)
> but I don't believe in that sort
> of ceiling regardless of how it's implemented, and someone is _bound_ to harp
> on it.)
true. thats also why you should always do timeouts checks like this
unsigned tick = timer counter (like _hz_200) + time to wait;
for (...)
if (timer counter - tick > 0) break;
instead of
...
if (timer counter > tick) break;
(and any compiler that `optimizes' the difference away should be shot. :)
cheers
Juergen
PS: but don't worry, there are enough bugs of this kind in TOS too...
--
J"urgen Lock / nox@jelal.north.de / UUCP: ..!uunet!unido!uniol!jelal!nox
...ohne Gewehr
PGP public key fingerprint = 8A 18 58 54 03 7B FC 12 1F 8B 63 C7 19 27 CF DA