Re: applying atomic assignment in which situation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

On Mon, Aug 9, 2010 at 20:15, Parmenides <mobile.parmenides@xxxxxxxxx> wrote:
> Furthermore, the definition of atomic_set is as follows
>
> #define atomic_set(v,i)         (((v)->counter) = (i))
>
> and there is seemingly no 'atomic feature' at all.

You bet...however, IIRC, atomic type in x86 32 bit is unsigned long
and that means its size is precisely the length of data bus (not sure
again if it's a correct term).

in x86, it's defined that anything stored not bigger than "data bus"
will be store atomically. And thanks to the fact that x86 don't
reorder read and write, at least writing value to memory is quite
predictable. I mean predictable here is it will be stored in the order
of the instruction that is received by processor...


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux