lkml.org 
[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch] Re: Nasty suprise with uptime
On Wed, 31 Oct 2001, Tim Schmielau wrote:

> On Wed, 31 Oct 2001, vda wrote:
>
[SNIPPED...]
>
> btw.: can someone please explain to me why do_timer uses
> (*(unsigned long *)&jiffies)++;
> instead of just doing jiffies++ ?
>
> Tim

It's an attempt to prevent the 'C' compiler from doing this:

movl (jiffies), %eax # Read
incl %eax # Modify
movl %eax, (jiffies) # Write

Instead, we want it to do this:

movl jiffies, %ebx # init a pointer
incl (%ebx) # Modify directly

With some gcc versions, it works. Others, it doesn't hurt.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

I was going to compile a list of innovations that could be
attributed to Microsoft. Once I realized that Ctrl-Alt-Del
was handled in the BIOS, I found that there aren't any.


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

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