diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-31 18:11:44 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-10-31 18:11:44 +0000 |
commit | ebf18fc8d6b3cafae38c1bf838f7cde8f3c8a476 (patch) | |
tree | f67411d1caed58af4a10e05969be9e1aa9909b51 /gcc/ada/s-tpoben.ads | |
parent | 4639a35c1a62b3fd534cdaf8f4876b102aca9d19 (diff) | |
download | gcc-ebf18fc8d6b3cafae38c1bf838f7cde8f3c8a476.tar.gz |
2006-10-31 Javier Miranda <miranda@adacore.com>
* s-tpoben.ads, s-tpoben.adb, s-taprob.ads, s-taprob.adb
(Get_Ceiling): New subprogram that returns
the ceiling priority of the protected object.
(Set_Ceiling): New subprogram that sets the new ceiling priority of
the protected object.
* s-tarest.adb: (Create_Restricted_Task): Fix potential CE.
* s-taskin.ads, s-taskin.adb: (Storage_Size): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118317 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tpoben.ads')
-rw-r--r-- | gcc/ada/s-tpoben.ads | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ada/s-tpoben.ads b/gcc/ada/s-tpoben.ads index 53ae4bf50ae..d19324d5a7b 100644 --- a/gcc/ada/s-tpoben.ads +++ b/gcc/ada/s-tpoben.ads @@ -7,7 +7,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -93,6 +93,16 @@ package System.Tasking.Protected_Objects.Entries is Ceiling : System.Any_Priority; -- Ceiling priority associated with the protected object + New_Ceiling : System.Any_Priority; + -- New ceiling priority associated to the protected object. In case + -- of assignment of a new ceiling priority to the protected object the + -- frontend generates a call to set_ceiling to save the new value in + -- this field. After such assignment this value can be read by means + -- of the 'Priority attribute, which generates a call to get_ceiling. + -- However, the ceiling of the protected object will not be changed + -- until completion of the protected action in which the assignment + -- has been executed (AARM D.5.2 (10/2)). + Owner : Task_Id; -- This field contains the protected object's owner. Null_Task -- indicates that the protected object is not currently being used. @@ -142,6 +152,10 @@ package System.Tasking.Protected_Objects.Entries is function To_Protection is new Unchecked_Conversion (System.Address, Protection_Entries_Access); + function Get_Ceiling + (Object : Protection_Entries_Access) return System.Any_Priority; + -- Returns the new ceiling priority of the protected object + function Has_Interrupt_Or_Attach_Handler (Object : Protection_Entries_Access) return Boolean; -- Returns True if an Interrupt_Handler or Attach_Handler pragma applies @@ -183,6 +197,11 @@ package System.Tasking.Protected_Objects.Entries is -- possible future use. At the current time, everyone uses Lock for both -- read and write locks. + procedure Set_Ceiling + (Object : Protection_Entries_Access; + Prio : System.Any_Priority); + -- Sets the new ceiling priority of the protected object + procedure Unlock_Entries (Object : Protection_Entries_Access); -- Relinquish ownership of the lock for the object represented by the -- Object parameter. If this ownership was for write access, or if it was |