[fpc-devel] InterLockedExchange vs InterLockedExchange64 using pointers on cpu64
jonas.maebe at elis.ugent.be
Thu Nov 4 10:44:53 CET 2010
On 03 Nov 2010, at 20:02, Andrew Brunner wrote:
> On a 64bit fpc compile, and 64bit system with pointers, which
> interlocked exchange is best used?
The one that matches the size of the data you are changing. The
compiler will give an error if you try to use the wrong one.
> Aren't pointers on x64 64bit
> Shouldn't we be using InterlockedExhange64 code to access
> specific x64 swaps?
If you mean "to swap pointers" with "specific x64 swaps", then no,
that is not necessary. The overloaded pointer variant is automatically
mapped to either the longint or int64 version depending on the target
More information about the fpc-devel