diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-18 11:51:53 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-18 11:51:53 +0000 |
commit | 86eaf84ceed538668220a292a8586fe5aec8e602 (patch) | |
tree | 64ee2821f35518d4a6aacb1c892e4cffb403f050 /gcc/ada/s-tposen.ads | |
parent | 8d6caf908f1c06b54de27e6591e359606e7e8a0e (diff) | |
download | gcc-86eaf84ceed538668220a292a8586fe5aec8e602.tar.gz |
2005-03-17 Jose Ruiz <ruiz@adacore.com>
* s-taprob.adb (Initialize_Protection): Initialize the protected
object's owner to Null_Task.
(Lock): If pragma Detect_Blocking is in effect and the caller of this
procedure is already the protected object's owner then Program_Error
is raised. In addition the protected object's owner is updated.
(Lock_Read_Only): If pragma Detect_Blocking is in effect and the caller
of this procedure is already the protected object's owner then
Program_Error is raised.
In addition the protected object's owner is updated.
(Unlock): Remove the ownership of the protected object.
* s-taprob.ads (Protection): Add the field Owner, used to store the
protected object's owner.
This component is needed for detecting one type of potentially blocking
operations (external calls on a protected subprogram with the same
target object as that of the protected action). Document the rest of
the components.
* s-tposen.adb, s-tpoben.adb (Initialize_Protection_Entries):
Initialize the protected object's owner to Null_Task.
(Lock_Read_Only_Entries): If pragma Detect_Blocking is in effect and the
caller of this procedure is already the protected object's owner then
Program_Error is raised.
Do not raise Program_Error when this procedure is called from a
protected action.
(Unlock_Entries): Remove the ownership of the protected object.
(Lock_Entries): If pragma Detect_Blocking is in effect and the caller
of this procedure is already the protected object's owner then
Program_Error is raised.
Do not raise Program_Error when this procedure is called from
a protected action.
* s-tposen.ads, s-tpoben.ads (Protection_Entries): Add the field Owner,
used to store the protected object's owner.
* s-tpobop.adb (Protected_Entry_Call): If pragma Detect_Blocking is in
effect and this procedure (a potentially blocking operation) is called
from whithin a protected action, Program_Error is raised.
(Timed_Protected_Entry_Call): If pragma Detect_Blocking is in effect
and this procedure (a potentially blocking operation) is called from
whithin a protected action, Program_Error is raised.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96675 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tposen.ads')
-rw-r--r-- | gcc/ada/s-tposen.ads | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/gcc/ada/s-tposen.ads b/gcc/ada/s-tposen.ads index 148098f4cae..8ad0cb43085 100644 --- a/gcc/ada/s-tposen.ads +++ b/gcc/ada/s-tposen.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2004 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005 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- -- @@ -277,12 +277,33 @@ package System.Tasking.Protected_Objects.Single_Entry is private type Protection_Entry is record - L : aliased Task_Primitives.Lock; - Compiler_Info : System.Address; - Call_In_Progress : Entry_Call_Link; - Ceiling : System.Any_Priority; - Entry_Body : Entry_Body_Access; - Entry_Queue : Entry_Call_Link; + L : aliased Task_Primitives.Lock; + -- The underlying lock associated with a Protection_Entries. Note that + -- you should never (un)lock Object.L directly, but instead use + -- Lock_Entry/Unlock_Entry. + + Compiler_Info : System.Address; + -- Pointer to compiler-generated record representing protected object + + Call_In_Progress : Entry_Call_Link; + -- Pointer to the entry call being executed (if any) + + Ceiling : System.Any_Priority; + -- Ceiling priority associated to the protected object + + Owner : Task_Id; + -- This field contains the protected object's owner. Null_Task + -- indicates that the protected object is not currently being used. + -- This information is used for detecting the type of potentially + -- blocking operations described in the ARM 9.5.1, par. 15 (external + -- calls on a protected subprogram with the same target object as that + -- of the protected action). + + Entry_Body : Entry_Body_Access; + -- Pointer to executable code for the entry body of the protected type + + Entry_Queue : Entry_Call_Link; + -- Place to store the waiting entry call (if any) end record; end System.Tasking.Protected_Objects.Single_Entry; |