Browse Source

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 12 years ago
parent
commit
fb873d6f02
1 changed files with 11 additions and 0 deletions
  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;