
26 Nov
2008
26 Nov
'08
12:46 p.m.
Lasse Kärkkäinen wrote:
Where is the magic? Can you point to some documentation or how to use it?
It seems to make the assumption that volatile variable reads and writes are atomic. This, among with careful organization of those operations, allows safe concurrent access.
This sort of assumption looks wrong. volatile should only instruct the compiler not to optimize the variable (e.g. in a register). BR, Dmitry