[fpc-devel] volatile variables
mschnell at lumino.de
Tue Jun 28 17:12:13 CEST 2011
On 06/28/2011 04:38 PM, Andrew Brunner wrote:
> 1.) How can we get the core to not relent and have the code handed off
> to another core until we're finished?
> 2.) How can we get the core to have a synchronised copy of a
> particular variable (aside from CAS)?
I suppose you need to ask these questions the hardware designers at
Intel or AMD (or read the appropriate docs).
If cache synchronization would not be done (even without forcing it by
atomic interlocked instructions or memory barriers) regarding the huge
cache provide with modern CPUs a thread would _never_ see what another
thread writes into memory. But (unless some kind of atomicness or
ordering is required) there are no issues on that behalf.
More information about the fpc-devel