[included comp.programming.threads]
"George2" <ge*************@yahoo.comwrote in message
news:dd**********************************@t1g2000p ra.googlegroups.com...
Hello everyone,
In the MSDN volatile sample,
http://msdn2.microsoft.com/en-us/lib...fd(VS.80).aspx
I do not understand what is the purpose of the sample. I have tried to
remove the keyword volatile, and the result is the same. :-)
Any ideas?
It means that MS compilers for PowerPC (e.g., XBOX), and Itanium (e.g.,
Itanic) based platforms do indeed assign significantly __overbearing!__
memory-barrier functionality to their most "basic" meaning of the volatile
keyword itself; by default! ;^(... Volatile is implementation defined
INDEED!
Basically, they assign heavy acquire-load membar semantics to EVERY _naked_
load, and release-store semantics to EVERY _naked_ store; this could be due
to their relationship with Intel I suppose. Keep in mind that Java does this
as well for programming "simplicity"; IMVHO, all of that crap is MAJOR
overkill and generates unneeded overheads on the memory coherency system in
general. Dumbs down things to a level that makes things ridiculous.
They certainly do NOT have any real need to define volatile such that it has
anything to do with shared-memory threading. IMO, using volatile and
threading in then same sentence is certainly misleading to say the least,
and usually winds up getting people to make erroneous assumptions about
C/C++ compilers...
;^(...