[Lazarus] thread safe
Michael Schnell
mschnell at lumino.de
Tue Jun 28 16:14:04 CEST 2011
On 06/28/2011 03:30 PM, Andrew Brunner wrote:
>
> LOL All the Interlocked / Compare and Swap statements are included in
> the system unit and are readily available and tested (at least on
> AMD).
I don't know an IDE called "AMD" ;-) .
I already did some research and found that on ARM there seem to be
issues with those.
On X64 there are hardware instructions for these operations, so I
believe they will work as expected (atomic but not memory ordering).
But if you need to do atomic operations that are moire complex than what
a single x86 instruction provides, you still need to use MUTEX
(CriticalSection). And same is bound to work on all systems (including
SMP) according to the Posix specs.
-Michael
More information about the Lazarus
mailing list