Re: (*(unsigned long *)&jiffies)++;

From: Petko Manolov (petkan@spct.net)
Date: Fri Jan 07 2000 - 03:39:07 EST


Andrea Arcangeli wrote:
>
> > movl foo,%eax ! Get it
> > leal 1(%eax),%edx ! bump it by one
> > movl %edx,foo ! write it back
>
> The above is perfect for a volatile variable IMHO. Also incl (without lock
> on the bus) is not atomic in SMP.

AFAIK incl _lock_ the bus even without "lock" in fornt of the
instruction
on 386 machine. Or at least i386 instruction set manual say so.
But there is no word about all this in the newest manual i got from
Intel.
Is this changed on i[56]86?

Petkan

-
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/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:08 EST