s-tpobop.adb (Requeue_Call): Introduce a dispatching point when requeuing to the...
authorJose Ruiz <ruiz@adacore.com>
Tue, 31 Oct 2006 18:11:57 +0000 (19:11 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 31 Oct 2006 18:11:57 +0000 (19:11 +0100)
2006-10-31  Jose Ruiz  <ruiz@adacore.com>

* s-tpobop.adb (Requeue_Call): Introduce a dispatching point when
requeuing to the same protected object to give higher priority tasks
the opportunity to execute.

From-SVN: r118318

gcc/ada/s-tpobop.adb

index c65438a9789f37f6de9f2e7f6f7cb0a2b41e9f0e..b8bfc9a3ef98b040e3bb3bff77de7a6c02adbdfd 100644 (file)
@@ -755,6 +755,12 @@ package body System.Tasking.Protected_Objects.Operations is
          else
             --  Requeue is to same protected object
 
+            --  ??? Try to compensate apparent failure of the
+            --  scheduler on some OS (e.g VxWorks) to give higher
+            --  priority tasks a chance to run (see CXD6002).
+
+            STPO.Yield (False);
+
             if Entry_Call.Requeue_With_Abort
               and then Entry_Call.Cancellation_Attempted
             then