* patch by Bi0T1N: fix result type of InterlockedCompareExchange64 for QWord, resolves #37186

git-svn-id: trunk@45647 -
This commit is contained in:
florian 2020-06-13 19:14:20 +00:00
parent febeef03e4
commit bc1b7960ec
2 changed files with 7 additions and 6 deletions

View File

@ -195,6 +195,7 @@ begin
{$endif}
inc(i);
end;
// Result:=Default(TValue);
// exception?
end;

View File

@ -1550,7 +1550,7 @@ function InterlockedIncrement64 (var Target: qword) : qword; external name 'FPC_
function InterlockedDecrement64 (var Target: qword) : qword; external name 'FPC_INTERLOCKEDDECREMENT64';
function InterlockedExchange64 (var Target: qword;Source : qword) : qword; external name 'FPC_INTERLOCKEDEXCHANGE64';
function InterlockedExchangeAdd64 (var Target: qword;Source : qword) : qword; external name 'FPC_INTERLOCKEDEXCHANGEADD64';
function InterlockedCompareExchange64(var Target: qword; NewValue: qword; Comperand: qword): int64; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE64';
function InterlockedCompareExchange64(var Target: qword; NewValue: qword; Comperand: qword): qword; external name 'FPC_INTERLOCKEDCOMPAREEXCHANGE64';
{$endif cpu64}