Re: [PATCH] 498+ days uptime

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Wed, 26 Aug 1998 20:09:43 +0100


On Tue, Aug 25, 1998 at 11:10:10PM +0000, H. Peter Anvin wrote:
> This is wrong: INC doesn't update CF; one of the many quirks of the
> x86 architecture. You need:

<sigh> Ok ok! You're about the tenth person to point this out!
(I knew it already, just, er, mentally slipped ;-)

> addl $1,counter
> adcl $0,counter+4

It's still tiny, fast code. My comments still apply -- 64-bit counters
would be no big deal.

To the person that noted this doesn't apply to counters like this:

bytes_sent += bytes_now

Actually that's no problem either. Make the counter macro take a 32-bit
argument. Use constant 1 in the usual cases.

-- Jamie

-
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.altern.org/andrebalsa/doc/lkml-faq.html