From ba2b29bd2cc75452b1a1578ac2c9a5e68db39723 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Mon, 10 Jul 2023 06:54:18 +0200 Subject: [PATCH] Fix cpu16 error in AtomicCmpExchange --- rtl/inc/system.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index 88a70cde5c..30b6406d87 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -2234,7 +2234,7 @@ end; function AtomicCmpExchange(var Target: word; NewValue, Comperand: word): word; {$ifdef SYSTEMINLINE}inline{$endif}; begin - Result:=InterlockedCompareExchange(TargetNewValue, Comperand); + Result:=InterlockedCompareExchange(Target, NewValue, Comperand); end;