On Mon, 01 Nov 2010 15:53:51 -0400, David Simcha <[email protected]> wrote:
I can't remember the reference off the top of my head, but I think inc
[EAX]
w/o the lock prefix is atomic for weak definitions of atomic, i.e. it
has no
intermediate states. However, without the lock prefix it is not
sequentially consistent.
Well, inc[EAX] is not multi-thread safe on my PC (Core i7), and every
article I've seen mentions the lock instruction. So I think lock; inc int
ptr [EAX]; is the only way to ensure all increments are seen. Also,
inc[EAX] is not implicitly a integer, but instead a byte.
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos