diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-11-19 12:25:38 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-11-19 12:25:38 +0100 |
commit | f0747897b654c6b9937a82de4a78542646858ff2 (patch) | |
tree | 2f2db91affa9415979e8aab44e7b82234142528b /gcc/ada | |
parent | 5c2d8276da3cfaacdefb54bdd54644cc72fe7ab9 (diff) | |
download | gcc-f0747897b654c6b9937a82de4a78542646858ff2.zip gcc-f0747897b654c6b9937a82de4a78542646858ff2.tar.gz gcc-f0747897b654c6b9937a82de4a78542646858ff2.tar.bz2 |
s-tposen.adb (Lock_Entry): Remove the code for raising Program_Error for Detect_Blocking which is...
* s-tposen.adb (Lock_Entry): Remove the code for raising Program_Error
for Detect_Blocking which is redundant with the check done within the
procedure Protected_Single_Entry_Call.
(Lock_Read_Only_Entry): Remove the code for raising Program_Error for
Detect_Blocking which is redundant with the check done within the
procedure Protected_Single_Entry_Call.
From-SVN: r90913
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/s-tposen.adb | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/gcc/ada/s-tposen.adb b/gcc/ada/s-tposen.adb index bb12679..7cbf84e 100644 --- a/gcc/ada/s-tposen.adb +++ b/gcc/ada/s-tposen.adb @@ -350,25 +350,18 @@ package body System.Tasking.Protected_Objects.Single_Entry is Ceiling_Violation : Boolean; begin - -- If pragma Detect_Blocking is active then Program_Error must - -- be raised if this potentially blocking operation is called from - -- a protected action, and the protected object nesting level - -- must be increased. + -- If pragma Detect_Blocking is active then the protected object + -- nesting level must be increased. if Detect_Blocking then declare Self_Id : constant Task_Id := STPO.Self; begin - if Self_Id.Common.Protected_Action_Nesting > 0 then - Ada.Exceptions.Raise_Exception - (Program_Error'Identity, "potentially blocking operation"); - else - -- We are entering in a protected action, so that we - -- increase the protected object nesting level. - - Self_Id.Common.Protected_Action_Nesting := - Self_Id.Common.Protected_Action_Nesting + 1; - end if; + -- We are entering in a protected action, so that we + -- increase the protected object nesting level. + + Self_Id.Common.Protected_Action_Nesting := + Self_Id.Common.Protected_Action_Nesting + 1; end; end if; @@ -390,25 +383,18 @@ package body System.Tasking.Protected_Objects.Single_Entry is Ceiling_Violation : Boolean; begin - -- If pragma Detect_Blocking is active then Program_Error must be - -- raised if this potentially blocking operation is called from a - -- protected action, and the protected object nesting level must - -- be increased. + -- If pragma Detect_Blocking is active then the protected object + -- nesting level must be increased. if Detect_Blocking then declare Self_Id : constant Task_Id := STPO.Self; begin - if Self_Id.Common.Protected_Action_Nesting > 0 then - Ada.Exceptions.Raise_Exception - (Program_Error'Identity, "potentially blocking operation"); - else - -- We are entering in a protected action, so that we - -- increase the protected object nesting level. - - Self_Id.Common.Protected_Action_Nesting := - Self_Id.Common.Protected_Action_Nesting + 1; - end if; + -- We are entering in a protected action, so that we + -- increase the protected object nesting level. + + Self_Id.Common.Protected_Action_Nesting := + Self_Id.Common.Protected_Action_Nesting + 1; end; end if; |