[fpc-pascal] Cmpxchg

Werner Van Belle werner at yellowcouch.org
Wed Mar 31 18:54:58 CEST 2010

Jonas Maebe wrote:
> On 31 Mar 2010, at 16:13, Werner Van Belle wrote:
>> I have been browsing the web somewhat to figure out how I can have
>> access to a cmpxchg function in freepascal. At the momente I found very
>> little information. Some references on people arguing that this is
>> unnecessary. Others that it takes too much time etcetera. In any case: I
>> _really_ want to have access to a cmpxchg function and tried to find
>> information on the assembler routines on how to get access to such
>> function.
> The function you want is InterlockedCompareExchange(), which is
> defined in the system unit:
> http://www.freepascal.org/docs-html/rtl/system/interlockedcompareexchange.html
> It does what cmpxchg does, and moreover is cross-platform.
Cool !!! Thanks a lot for the info. This is exactly what I was looking for !


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100331/2c566f4d/attachment.sig>

More information about the fpc-pascal mailing list