lkml.org 
[lkml]   [2000]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: (*(unsigned long *)&jiffies)++;
On Thu, 6 Jan 2000, Davide Libenzi wrote:
>
> Why split a sigle, atomic, register clobber free and less expensive instruction
> like "incl xx" with a - load , incr , store sequence.
>
> The only reason I can see is the absence of the "incl" instruction on some
> processor.

You are correct. Many processors can not increment a memory location
directly. They have to read into a register, modify, then write it
back. At the bus level, even processors that do it all in one op-code
are really reading/modifying/writing. However, such processors are
not interrupted between these operations so they are atomic (for
that operation on that CPU only).

Cheers,
Dick Johnson

Penguin : Linux version 2.3.35 on an i686 machine (400.59 BogoMips).


-
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.tux.org/lkml/

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