lkml.org 
[lkml]   [1998]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 498+ days uptime
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

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.202 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site