Ver Fonte

rtl/m68k/m68k.inc:
dummyplement Interlocked* functions; they are not locking in any way, but at least they do what they should

git-svn-id: trunk@22884 -

svenbarth há 12 anos atrás
pai
commit
fb873d6f02
1 ficheiros alterados com 11 adições e 0 exclusões
  1. 11 0
      rtl/m68k/m68k.inc

+ 11 - 0
rtl/m68k/m68k.inc

@@ -338,28 +338,39 @@ function abs(l : longint) : longint;
 function InterLockedDecrement (var Target: longint) : longint;
   begin
   {$warning FIX ME}
+    Result := Target;
+    Dec(Target);
   end;
 
 
 function InterLockedIncrement (var Target: longint) : longint;
   begin
   {$warning FIX ME}
+    Result := Target;
+    Inc(Target);
   end;
 
 
 function InterLockedExchange (var Target: longint;Source : longint) : longint;
   begin
   {$warning FIX ME}
+    Result := Target;
+    Target := Source;
   end;
 
 
 function InterLockedExchangeAdd (var Target: longint;Source : longint) : longint;
   begin
   {$warning FIX ME}
+    Result := Target;
+    Target := Target + Source;
   end;
 
 
 function InterlockedCompareExchange(var Target: longint; NewValue: longint; Comperand: longint): longint;
   begin
   {$warning FIX ME}
+    Result := Target;
+    if Target = Comperand then
+      Target := NewValue;
   end;