Browse Source

* Use ThreadSwitch.

git-svn-id: trunk@32076 -
yury 10 năm trước cách đây
mục cha
commit
44777f3797
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  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)