Parcourir la source

* Use ThreadSwitch.

git-svn-id: trunk@32076 -
yury il y a 10 ans
Parent
commit
44777f3797
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  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)