@@ -207,6 +207,12 @@ package System.Tasking.Protected_Objects is
-- lock and allowed to return from the Lock or Lock_Read_Only call.
private
+ -- The following type contains the GNARL state of a protected object.
+ -- The application-defined portion of the state (i.e. private objects)
+ -- is maintained by the compiler-generated code. Note that there is
+ -- another version declared in System.Tasking.Protected_Objects.Entries
+ -- that handles the case with entries and is controlled.
+
type Protection is record
L : aliased Task_Primitives.Lock;
-- Lock used to ensure mutual exclusive access to the protected object
@@ -70,9 +70,9 @@ package System.Tasking is
-- Unlock (Y);
-- Locks with lower (smaller) level number cannot be locked
- -- while holding a lock with a higher level number. (The level
+ -- while holding a lock with a higher level number.
- -- 1. System.Tasking.PO_Simple.Protection.L (any PO lock)
+ -- 1. System.Tasking.Protected_Objects.Protection.L (any PO lock)
-- 2. System.Tasking.Initialization.Global_Task_Lock (in body)
-- 3. System.Task_Primitives.Operations.Single_RTS_Lock
-- 4. System.Tasking.Ada_Task_Control_Block.LL.L (any TCB lock)
@@ -79,8 +79,8 @@ package System.Tasking.Protected_Objects.Entries is
-- The following type contains the GNARL state of a protected object.
-- The application-defined portion of the state (i.e. private objects)
-- is maintained by the compiler-generated code. Note that there is a
- -- simplified version of this type declared in System.Tasking.PO_Simple
- -- that handle the simple case (no entries).
+ -- simplified version declared in System.Tasking.Protected_Objects that
+ -- handles the simple case (no entries) and is not controlled.
type Protection_Entries (Num_Entries : Protected_Entry_Index) is new
Ada.Finalization.Limited_Controlled
From: Eric Botcazou <ebotcazou@adacore.com> The child unit was renamed a while ago. gcc/ada/ * libgnarl/s-taprob.ads (Protection): Add cross-reference to the counterpart in System.Tasking.Protected_Objects.Entries. * libgnarl/s-taskin.ads (Locking Rules): Replace PO_Simple by Protected_Objects. * libgnarl/s-tpoben.ads (Protection_Entries): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnarl/s-taprob.ads | 6 ++++++ gcc/ada/libgnarl/s-taskin.ads | 4 ++-- gcc/ada/libgnarl/s-tpoben.ads | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-)