mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-01 08:26:16 +02:00
* fixed InterlockedCompareExchange
git-svn-id: trunk@3947 -
This commit is contained in:
parent
fe43dc6266
commit
b9125f97d0
@ -1176,13 +1176,14 @@ end;
|
||||
function InterlockedCompareExchange(var Target: longint; NewValue: longint; Comperand: longint): longint; assembler;
|
||||
asm
|
||||
{$ifdef REGCALL}
|
||||
xchgl %eax,%edx
|
||||
xchgl %eax,%ecx
|
||||
{$else}
|
||||
movl Target,%edx
|
||||
movl NewValue,%eax
|
||||
movl Target,%ecx
|
||||
movl NewValue,%edx
|
||||
movl Comparand,%eax
|
||||
{$endif}
|
||||
lock
|
||||
cmpxchgl %eax, (%edx)
|
||||
cmpxchgl %edx, (%ecx)
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user