summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-19 11:25:38 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-19 11:25:38 +0000
commitd40c5d81c435421c955a8f63db7b1c1d8da90c9b (patch)
tree2f2db91affa9415979e8aab44e7b82234142528b /gcc/ada
parentb54ade8d27ce946d7cb3d70ab4ef0c55da681590 (diff)
downloadgcc-d40c5d81c435421c955a8f63db7b1c1d8da90c9b.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90913 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/s-tposen.adb42
1 files changed, 14 insertions, 28 deletions
diff --git a/gcc/ada/s-tposen.adb b/gcc/ada/s-tposen.adb
index bb1267969c1..7cbf84e6ded 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;