Browse Source

* Use ThreadSwitch.

git-svn-id: trunk@32076 -
yury 9 years ago
parent
commit
44777f3797
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tests/test/tinterlockedmt.pp

+ 4 - 0
tests/test/tinterlockedmt.pp

@@ -123,7 +123,11 @@ begin
               writeln('InterLockedCompareExchange seems to be broken.');
               Halt(10);
             end;
+          {$ifdef FPC}
+            ThreadSwitch;
+          {$else}
             Sleep(0);
+          {$endif FPC}
           end;
           if FOption + 2 <> LastCompareVal then
             InterLockedIncrement(Counter3)