diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-03-05 11:58:59 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-03-05 11:58:59 +0100 |
commit | 8a6a52dcb9b0a1f64fcaee58936fc84d416c7651 (patch) | |
tree | d7e76278139b8a14ab79056f737b24f8081eaf15 /gcc/ada/s-tpobop.adb | |
parent | 35bd3c283e349040506360ea6a4215d3a4adbff8 (diff) | |
download | gcc-8a6a52dcb9b0a1f64fcaee58936fc84d416c7651.zip gcc-8a6a52dcb9b0a1f64fcaee58936fc84d416c7651.tar.gz gcc-8a6a52dcb9b0a1f64fcaee58936fc84d416c7651.tar.bz2 |
[multiple changes]
2004-03-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* trans.c: Reflect GCC changes to fix bootstrap problem.
Add warning for suspicious aliasing unchecked conversion.
2004-03-05 Robert Dewar <dewar@gnat.com>
* 56taprop.adb, 5ataprop.adb: Remove unneeded unchecked conversions
* a-tags.adb, a-tags.ads, s-finimp.adb, s-finroo.ads,
i-cpoint.ads, i-cpoint.adb, i-cstrin.adb, i-cstrin.ads,
5iosinte.ads, 5sosinte.ads, 5staspri.ads, 5itaprop.adb,
5staprop.adb, 5wtaprop.adb, s-tataat.ads, s-tataat.adb: Move
unchecked conversion to spec to avoid warnings.
* s-tasini.adb, s-taskin.ads, 5atpopsp.adb: Correct spelling Task_Id
to Task_ID
* 7stpopsp.adb: Correct casing in To_Task_ID call
* a-strsea.ads, a-strsea.adb: Minor reformatting
* einfo.ads, einfo.adb: Define new flag No_Strict_Aliasing
* errout.ads: Switch for VMS is now NO_STRICT_ALIASING.
Adjust Max_Msg_Length to be clearly large enough.
* fe.h: Define In_Same_Source_Unit
* osint.adb: Add pragma Warnings Off to suppress warnings
* g-dyntab.adb, g-table.adb, g-thread.adb: Add Warnings (Off) to kill
aliasing warnings.
* opt.ads: Put entries in alpha order. Add entry for No_Strict_Aliasing
* par-prag.adb: Add dummy entry for No_Strict_Aliasing pragma
* sem_ch13.adb: Generate validate unchecked conversion nodes for gcc.
* sem_ch3.adb: Set No_Strict_Aliasing flag if config pragma set.
* sem_prag.adb: Implement pragma No_Strict_Aliasing.
* sinfo.ads: Remove obsolete comment on validate unchecked conversion
node. We now do generate them for gcc back end.
* table.adb, sinput.adb: Add pragma Warnings Off to suppress aliasing
warning.
* sinput-c.adb: Fix bad name in header.
Add pragma Warnings Off to suppress aliasing warning.
* sinput-l.adb: Add pragma Warnings Off to suppress aliasing warning.
* snames.h, snames.ads, snames.adb: Add entry for pragma
No_Strict_Aliasing.
2004-03-05 Vincent Celier <celier@gnat.com>
* prj-com.ads: Add hash table Files_Htable to check when a file name
is already a source of another project.
* prj-nmsc.adb (Record_Source): Before recording a new source, check
if its file name is not already a source of another project. Report an
error if it is.
* gnatcmd.adb: When GNAT PRETTY is invoked with a project file and no
source file name, call gnatpp with all the sources of the main project.
* vms_conv.adb (Initialize): GNAT PRETTY may be called with any number
of file names.
* vms_data.ads: Correct documentation of new /OPTIMIZE keyword
NO_STRICT_ALIASING. Add new qualifier for GNAT PRETTY:
/RUNTIME_SYSTEM=, converted to --RTS=
/NOTABS, converted to -notabs
2004-03-05 Pascal Obry <obry@gnat.com>
* make.adb: Minor reformatting.
2004-03-05 Ed Schonberg <schonberg@gnat.com>
Part of implemention of AI-262.
* par-ch10.adb (P_Context_Clause): Recognize private with_clauses.
* sem_ch10.ads, sem_ch10.adb: (Install_Private_With_Clauses): New
procedure.
* sem_ch3.adb (Analyze_Component_Declaration): Improve error message
when component type is a partially constrained class-wide subtype.
(Constrain_Discriminated_Type): If parent type has unknown
discriminants, a constraint is illegal, even if full view has
discriminants.
(Build_Derived_Record_Type): Inherit discriminants when deriving a type
with unknown discriminants whose full view is a discriminated record.
* sem_ch7.adb (Preserve_Full_Attributes): Preserve Has_Discriminants
flag, to handle properly derivations of tagged types with unknown
discriminants.
(Analyze_Package_Spec, Analyze_Package_Body): Install
Private_With_Clauses before analyzing private part or body.
* einfo.ads: Indicate that both Has_Unknown_Discriminants and
Has_Discriminants can be true for a given type (documentation).
2004-03-05 Arnaud Charlet <charlet@act-europe.fr>
* s-restri.ads: Fix license (GPL->GMGPL).
* s-tassta.adb: Minor reformatting.
* s-tasren.adb: Replace manual handling of Self_Id.ATC_Nesting_Level
by calls to Exit_One_ATC_Level, since additional clean up is performed
by this function.
* s-tpobop.adb: Replace manual handling of Self_Id.ATC_Nesting_Level
by calls to Exit_One_ATC_Level, since additional clean up is performed
by this function.
2004-03-05 GNAT Script <nobody@gnat.com>
* Make-lang.in: Makefile automatically updated
From-SVN: r78964
Diffstat (limited to 'gcc/ada/s-tpobop.adb')
-rw-r--r-- | gcc/ada/s-tpobop.adb | 53 |
1 files changed, 34 insertions, 19 deletions
diff --git a/gcc/ada/s-tpobop.adb b/gcc/ada/s-tpobop.adb index cf15ed9..5bbe18e 100644 --- a/gcc/ada/s-tpobop.adb +++ b/gcc/ada/s-tpobop.adb @@ -80,6 +80,9 @@ with System.Tasking.Queuing; with System.Tasking.Rendezvous; -- used for Task_Do_Or_Queue +with System.Tasking.Utilities; +-- used for Exit_One_ATC_Level + with System.Tasking.Debug; -- used for Trace @@ -400,16 +403,16 @@ package body System.Tasking.Protected_Objects.Operations is Update_For_Queue_To_PO (Entry_Call, With_Abort); else - -- ????? - -- Can we convert this recursion to a loop? + -- Can we convert this recursion to a loop??? PO_Do_Or_Queue (Self_ID, New_Object, Entry_Call, With_Abort); end if; end if; end if; - elsif Entry_Call.Mode /= Conditional_Call or else - not With_Abort then + elsif Entry_Call.Mode /= Conditional_Call + or else not With_Abort + then Queuing.Enqueue (Object.Entry_Queues (E), Entry_Call); Update_For_Queue_To_PO (Entry_Call, With_Abort); @@ -729,17 +732,25 @@ package body System.Tasking.Protected_Objects.Operations is Initially_Abortable := Entry_Call.State = Now_Abortable; PO_Service_Entries (Self_ID, Object); - -- Try to prevent waiting later (in Cancel_Protected_Entry_Call) + -- Try to prevent waiting later (in Try_To_Cancel_Protected_Entry_Call) -- for completed or cancelled calls. (This is a heuristic, only.) if Entry_Call.State >= Done then -- Once State >= Done it will not change any more. - Self_ID.ATC_Nesting_Level := Self_ID.ATC_Nesting_Level - 1; - pragma Debug - (Debug.Trace (Self_ID, "PEC: exited to ATC level: " & - ATC_Level'Image (Self_ID.ATC_Nesting_Level), 'A')); + if Single_Lock then + STPO.Lock_RTS; + end if; + + STPO.Write_Lock (Self_ID); + Utilities.Exit_One_ATC_Level (Self_ID); + STPO.Unlock (Self_ID); + + if Single_Lock then + STPO.Unlock_RTS; + end if; + Block.Enqueued := False; Block.Cancelled := Entry_Call.State = Cancelled; Initialization.Undefer_Abort (Self_ID); @@ -986,25 +997,29 @@ package body System.Tasking.Protected_Objects.Operations is PO_Do_Or_Queue (Self_Id, Object, Entry_Call, With_Abort => True); PO_Service_Entries (Self_Id, Object); + if Single_Lock then + STPO.Lock_RTS; + else + STPO.Write_Lock (Self_Id); + end if; + -- Try to avoid waiting for completed or cancelled calls. if Entry_Call.State >= Done then - Self_Id.ATC_Nesting_Level := Self_Id.ATC_Nesting_Level - 1; - pragma Debug - (Debug.Trace (Self_Id, "TPEC: exited to ATC level: " & - ATC_Level'Image (Self_Id.ATC_Nesting_Level), 'A')); + Utilities.Exit_One_ATC_Level (Self_Id); + + if Single_Lock then + STPO.Unlock_RTS; + else + STPO.Unlock (Self_Id); + end if; + Entry_Call_Successful := Entry_Call.State = Done; Initialization.Undefer_Abort (Self_Id); Entry_Calls.Check_Exception (Self_Id, Entry_Call); return; end if; - if Single_Lock then - STPO.Lock_RTS; - else - STPO.Write_Lock (Self_Id); - end if; - Entry_Calls.Wait_For_Completion_With_Timeout (Entry_Call, Timeout, Mode, Yielded); |