Skip to content

Dynamic Priorities

Dynamic Priorities#

This subclause describes how the base priority of a task can be modified or queried at run time.

with System;
with Ada.Task_Identification; -- See C.7.1

package Ada.Dynamic_Priorities
   with Preelaborate, Nonblocking, Global => in out synchronized is

   procedure Set_Priority(Priority: System.Any_Priority;
                          T: Ada.Task_Identification.Task_Id :=
                             Ada.Task_Identification.Current_Task);
   function Get_Priority(T: Ada.Task_Identification.Task_Id :=
                            Ada.Task_Identification.Current_Task)
      return System.Any_Priority;
end Ada.Dynamic_Priorities;

Erroneous Execution

If any subprogram in this package is called with a parameter T that specifies a task object that no longer exists, the execution of the program is erroneous.