Once upon a time, on 02/07/2013 03:11 PM to be precise, Jonas Maebe said: > The interlocked* routines only guarantee that that particular value is > updated in atomic way across multiple cores. It does not guarantee > anything about memory access performed before or after that > interlocked* call. The memory barriers are to ensure that all memory > accesses before the lock-primitive (such as > Enter/LeaveCriticalSection) are also synchronized across all cores. Right, I see your point, should be documented if you ask me (like `This call doesn't guarantee any kind of memory barrier.`). Altough I still don't see how you can make these calls atomic then (without the barrier)? I guess I'll have to take a peek at the source code for these calls on different platforms/architectures...
-- Ewald _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel