From 6bfca529f07dd66d9f140f0a9965ebed84510a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Primo=C5=BE=20Gabrijel=C4=8Di=C4=8D?= Date: Wed, 28 Feb 2018 16:53:25 +0100 Subject: [PATCH] TOmniAlignedInt64.Value was already atomic, eh --- OtlCommon.pas | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/OtlCommon.pas b/OtlCommon.pas index 1786005e..27d01c29 100644 --- a/OtlCommon.pas +++ b/OtlCommon.pas @@ -35,12 +35,10 @@ /// Blog : http://thedelphigeek.com /// Contributors : GJ, Lee_Nover, scarre, Sean B. Durkin /// Creation date : 2008-06-12 -/// Last modification : 2018-02-24 -/// Version : 1.49 +/// Last modification : 2017-07-26 +/// Version : 1.48 /// /// History: -/// 1.49: 2018-02-24 -/// - Reading/writing TOmniAlignedInt64 is atomic on 32-bit platforms. /// 1.48: 2017-07-26 /// - TOmniMessageID can now hold TProc. /// 1.47: 2017-02-03 @@ -4673,13 +4671,7 @@ function TOmniAlignedInt64.Decrement(value: int64): int64; function TOmniAlignedInt64.GetValue: int64; begin - {$IFDEF CPU64BITS} Result := Addr^; - {$ELSE}{$IFDEF MSWindows} - Result := DSiInterlockedCompareExchange64(Addr^, 0, 0); - {$ELSE} - Result := TInterlocked.Read(Addr^); - {$ENDIF}{$ENDIF} end; { TOmniAlignedInt64.GetValue } function TOmniAlignedInt64.Increment: int64; @@ -4702,13 +4694,7 @@ function TOmniAlignedInt64.Increment(value: int64): int64; procedure TOmniAlignedInt64.SetValue(value: int64); begin - {$IFDEF CPU64BITS} Addr^ := value; - {$ELSE}{$IFDEF MSWindows} - DSiInterlockedExchange64(Addr^, value); - {$ELSE} - TInterlocked.Exchange(Addr^, value); - {$ENDIF}{$ENDIF} end; { TOmniAlignedInt64.SetValue } { TOmniIntegerSet }