aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-tpoben.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-01-26 10:56:25 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2010-01-26 10:56:25 +0100
commit1a1054884e248ff337bb8958e1889b90c192f22d (patch)
tree39d4362ce79e1cff512ceb6da7520b7144968011 /gcc/ada/s-tpoben.adb
parent057dd91d0c1df52679f71644d95fea2ae9522f3e (diff)
downloadgcc-1a1054884e248ff337bb8958e1889b90c192f22d.zip
gcc-1a1054884e248ff337bb8958e1889b90c192f22d.tar.gz
gcc-1a1054884e248ff337bb8958e1889b90c192f22d.tar.bz2
[multiple changes]
2010-01-26 Vincent Celier <celier@adacore.com> * gnat_ugn.texi: Complete documentation on the restrictions for combined options in -gnatxxx switches. Fix typo. 2010-01-26 Arnaud Charlet <charlet@adacore.com> * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from a controlled operation, abort is already deferred at this point, so we need to use Defer_Abort_Nestable. 2010-01-26 Vincent Celier <celier@adacore.com> * prj-conf.adb (Get_Config_Switches): Check for a default language for a project extending a project with no languages. From-SVN: r156237
Diffstat (limited to 'gcc/ada/s-tpoben.adb')
-rw-r--r--gcc/ada/s-tpoben.adb13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ada/s-tpoben.adb b/gcc/ada/s-tpoben.adb
index cd200d4..561d793 100644
--- a/gcc/ada/s-tpoben.adb
+++ b/gcc/ada/s-tpoben.adb
@@ -226,9 +226,18 @@ package body System.Tasking.Protected_Objects.Entries is
raise Program_Error;
end if;
- Initialization.Defer_Abort (Self_ID);
+ -- If a PO is created from a controlled operation, abort is already
+ -- deferred at this point, so we need to use Defer_Abort_Nestable
+ -- In some cases, the below assertion can be useful to spot
+ -- inconsistencies, outside the above scenario involving controlled
+ -- types:
+
+ -- pragma Assert (Self_Id.Deferral_Level = 0);
+ -- Why is this commented out Assert here ???
+
+ Initialization.Defer_Abort_Nestable (Self_ID);
Initialize_Lock (Init_Priority, Object.L'Access);
- Initialization.Undefer_Abort (Self_ID);
+ Initialization.Undefer_Abort_Nestable (Self_ID);
Object.Ceiling := System.Any_Priority (Init_Priority);
Object.New_Ceiling := System.Any_Priority (Init_Priority);