On 08 Feb 2013, at 19:06, Florian Klämpfl wrote:

> Am 08.02.2013 16:02, schrieb Jonas Maebe:
>> 
>> On 07 Feb 2013, at 16:52, Ewald wrote:
>> 
>>> Altough I still
>>> don't see how you can make these calls atomic then (without the
>>> barrier)?
>> 
>> On x86, it is impossible to perform an atomic access without a (partial)
>> memory barrier that affects all memory (due to the behaviour of the
>> "lock" prefix). On other architectures, the instructions for atomic
>> accesses may only lock the cacheline or memory page containing the value
>> to be atomically modified. I.e., they are only a barrier for that
>> cacheline/page, not for the entire memory.
> 
> This might change with Haswell though (when the new instructions are used).

It is already not a memory barrier for certain SSE instructions, that's why I 
wrote "(partial)".


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to