| 1 |
------------------------------------------------------------------------------ |
| 2 |
-- -- |
| 3 |
-- GNAT RUN-TIME COMPONENTS -- |
| 4 |
-- -- |
| 5 |
-- A D A . D Y N A M I C _ P R I O R I T I E S -- |
| 6 |
-- -- |
| 7 |
-- S p e c -- |
| 8 |
-- -- |
| 9 |
-- This specification is derived from the Ada Reference Manual for use with -- |
| 10 |
-- GNAT. In accordance with the copyright of that document, you can freely -- |
| 11 |
-- copy and modify this specification, provided that if you redistribute a -- |
| 12 |
-- modified version, any changes that you have made are clearly indicated. -- |
| 13 |
-- -- |
| 14 |
------------------------------------------------------------------------------ |
| 15 |
|
| 16 |
-- This unit implements dynamic priority support for Ada tasking as defined |
| 17 |
-- in ARM D.5.1. It allows a tasks priority to be changed after the task has |
| 18 |
-- been created. |
| 19 |
|
| 20 |
with System; |
| 21 |
with Ada.Task_Identification; |
| 22 |
|
| 23 |
package Ada.Dynamic_Priorities is |
| 24 |
pragma Preelaborate; |
| 25 |
-- In accordance with Ada 2005 AI-362 |
| 26 |
|
| 27 |
procedure Set_Priority |
| 28 |
(Priority : System.Any_Priority; |
| 29 |
T : Ada.Task_Identification.Task_Id := |
| 30 |
Ada.Task_Identification.Current_Task); |
| 31 |
|
| 32 |
function Get_Priority |
| 33 |
(T : Ada.Task_Identification.Task_Id := |
| 34 |
Ada.Task_Identification.Current_Task) |
| 35 |
return System.Any_Priority; |
| 36 |
|
| 37 |
end Ada.Dynamic_Priorities; |