Subj : Re: Memory visibility and MS Interlocked instructions To : comp.programming.threads From : Chris Thomasson Date : Sun Aug 28 2005 06:06 pm > Will InterlockedExchange ensure that the ( fValueHasBeenComputed == TRUE ) > condition is not made visible "before" ComputeValues(...)'s effects are > made visible? Humm... This example of DCL "may" be busted on the writer's > end as well... Humm, missed this part... >> The InterlockedExchange function ensures that the value of iValue is >> updated for all processors before the value of fValueHasBeenComputed is >> set to TRUE. Note how it doesn't say anything about ComputeValue(...), it just says that iValue will be updated first. However, I guess that guarantees ComputeValue(...) effects will be fully visible before the flag is set. Does anyone totally trust that assertion, without disassembling the Interlocked API's? ;) .