Hi...

On Mon, Aug 9, 2010 at 20:15, Parmenides <[email protected]> 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 [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to