aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-tpobop.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-09-09 12:32:50 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-09-09 12:32:50 +0200
commitbd29d5193a42a7fbe92c5052fa8d28f35290c823 (patch)
tree29c9bde6be0184567a5d781848146e9b3c6e96b3 /gcc/ada/s-tpobop.adb
parent0e35524dec6e62dfe35360f11eee7c7031c5ab2e (diff)
downloadgcc-bd29d5193a42a7fbe92c5052fa8d28f35290c823.zip
gcc-bd29d5193a42a7fbe92c5052fa8d28f35290c823.tar.gz
gcc-bd29d5193a42a7fbe92c5052fa8d28f35290c823.tar.bz2
[multiple changes]
2010-09-09 Vincent Celier <celier@adacore.com> * osint.adb (Canonical_Case_File_Name): Use procedure To_Lower in System.Case_Util (Canonical_Case_Env_Var_Name): Ditto 2010-09-09 Bob Duff <duff@adacore.com> * g-pehage.adb (Allocate): Initialize the allocated elements of IT. 2010-09-09 Robert Dewar <dewar@adacore.com> * cstand.adb: Mark Boolean and Character types as Ordered * einfo.adb (Has_Pragma_Ordered): New flag * einfo.ads (Has_Pragma_Ordered): New flag * g-calend.ads: Mark Day_Name as Ordered * opt.ads: Mark Ada_Version_Type as Ordered (Warn_On_Unordered_Enumeration_Type): New flag * par-prag.adb: Add procdessing for pragma Ordered * s-ficobl.ads (Read_File_Mode): New subtype * s-fileio.adb: Use Read_File_Mode instead of explicit ranges * s-taskin.ads: Mark Entry_Call_State as ordered * sem_ch3.adb (Build_Derived_Enumeration_Type): Inherit Has_Pragma_Ordered. * sem_ch6.ads: Mark Conformance_Type as Ordered * sem_prag.adb: Implement pragma Ordered * sem_res.adb (Bad_Unordered_Enumeration_Reference): New function (Resolve_Comparison_Op): Diagnose unordered comparison (Resolve_Range): Diagnose unordered range * sem_warn.adb (Warn_On_Unordered_Enumeration_Type): New flag (from -gnatw.u/U) * snames.ads-tmpl: Add entry for pragma Ordered * style.ads (Check_Enumeration_Subrange): Removed * styleg.adb (Check_Enumeration_Subrange): Removed * styleg.ads (Check_Enumeration_Subrange): Removed * stylesw.adb: Remove handling of -gnatyE switch * stylesw.ads: (Style_Check_Enumeration_Subranges): Removed * vms_data.ads: Remove -gnatyE entries Add -gnatw.u entries * ug_words: Entries for -gnatw.u and -gnatw.U * gnat_ugn.texi: Document -gnatw.u/-gnatw.U switches * gnat_rm.texi: Document pragma Ordered. * s-tasren.adb: Avoid unnecessary comparison on unordered enumeration. * s-tpobop.adb: Remove comparison on unordered enumeration type. From-SVN: r164070
Diffstat (limited to 'gcc/ada/s-tpobop.adb')
-rw-r--r--gcc/ada/s-tpobop.adb36
1 files changed, 18 insertions, 18 deletions
diff --git a/gcc/ada/s-tpobop.adb b/gcc/ada/s-tpobop.adb
index 13688e6..f9ca610 100644
--- a/gcc/ada/s-tpobop.adb
+++ b/gcc/ada/s-tpobop.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2010, 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- --
@@ -646,26 +646,26 @@ package body System.Tasking.Protected_Objects.Operations is
end if;
end if;
- elsif Mode < Asynchronous_Call then
-
- -- Simple_Call or Conditional_Call
-
- if Single_Lock then
- STPO.Lock_RTS;
- Entry_Calls.Wait_For_Completion (Entry_Call);
- STPO.Unlock_RTS;
+ else
+ case Mode is
+ when Simple_Call | Conditional_Call =>
+ if Single_Lock then
+ STPO.Lock_RTS;
+ Entry_Calls.Wait_For_Completion (Entry_Call);
+ STPO.Unlock_RTS;
- else
- STPO.Write_Lock (Self_ID);
- Entry_Calls.Wait_For_Completion (Entry_Call);
- STPO.Unlock (Self_ID);
- end if;
+ else
+ STPO.Write_Lock (Self_ID);
+ Entry_Calls.Wait_For_Completion (Entry_Call);
+ STPO.Unlock (Self_ID);
+ end if;
- Block.Cancelled := Entry_Call.State = Cancelled;
+ Block.Cancelled := Entry_Call.State = Cancelled;
- else
- pragma Assert (False);
- null;
+ when Asynchronous_Call | Timed_Call =>
+ pragma Assert (False);
+ null;
+ end case;
end if;
Initialization.Undefer_Abort_Nestable (Self_ID);