فهرست منبع

* Use ThreadSwitch.

git-svn-id: trunk@32076 -
yury 10 سال پیش
والد
کامیت
44777f3797
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  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)