diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-05-17 15:20:48 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-05-17 15:20:48 +0200 |
commit | b5e792e209cfee6fe3437eef9470e7765acda53f (patch) | |
tree | 2b5692e6b47e044d030ae4b10881296d50e2f101 /gcc/ada/s-taprop.ads | |
parent | 646ca712a1d3d4b6642b8d9c3f0d24e463102b76 (diff) | |
download | gcc-b5e792e209cfee6fe3437eef9470e7765acda53f.tar.gz |
[multiple changes]
2004-05-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Part of function-at-a-time conversion
* misc.c (adjust_decl_rtl): Deleted.
(LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK):
Define.
* gigi.h: (adjust_decl_rtl, kept_level_p, set_block): Deleted.
(add_decl_stmt, add_stmt, block_has_vars): New functions.
(gnat_pushlevel, gnat_poplevel): Renamed from pushlevel and poplevel.
* decl.c (elaborate_expression, maybe_pad_type): Call add_decl_stmt
when making a decl.
(gnat_to_gnu_entity): Likewise.
Use add_stmt to update setjmp buffer.
Set TREE_ADDRESSABLE instead of calling put_var_into_stack and
flush_addressof.
No longer call adjust_decl_rtl.
(DECL_INIT_BY_ASSIGN_P): New macro.
(DECL_STMT_VAR): Likewise.
* trans.c (gigi): Call start_block_stmt to make the outermost
BLOCK_STMT.
(gnat_to_code, gnu_to_gnu, tree_transform, process_decls, process_type):
Call start_block_stmt and end_block_stmt temporarily.
Use gnat_expand_stmt instead of expand_expr_stmt.
(add_decl_stmt): New function.
(tree_transform): Call it.
(add_stmt): Also emit initializing assignment for DECL_STMT if needed.
(end_block_stmt): Set type and NULL_STMT.
(gnat_expand_stmt): Make recursize call instead of calling
expand_expr_stmt.
(gnat_expand_stmt, case DECL_STMT): New case.
(set_lineno_from_sloc): Do nothing if global.
(gnu_block_stmt_node, gnu_block_stmt_free_list): New variables.
(start_block_stmt, add_stmt, end_block_stmt): New functions.
(build_block_stmt): Call them.
(gnat_to_code): Don't expand NULL_STMT.
(build_unit_elab): Rename pushlevel and poplevel to gnat_* and change
args.
(tree_transform): Likewise.
(tree_transform, case N_Null_Statement): Return NULL_STMT.
(gnat_expand_stmt, case NULL_STMT): New case.
(gnat_expand_stmt, case IF_STMT): Allow nested IF_STMT to have no
IF_STMT_TRUE.
* utils2.c (gnat_mark_addressable, case VAR_DECL): Do not set
TREE_ADDRESSABLE.
* utils.c (create_var_decl): Do not call expand_decl or
expand_decl_init.
Set TREE_ADDRESSABLE instead of calling gnat_mark_addressable.
Set DECL_INIT_BY_ASSIGN_P when needed and do not generate MODIFY_EXPR
here.
(struct e_stack): Add chain_next to GTY.
(struct binding_level): Deleted.
(struct ada_binding_level): New struct.
(free_block_chain): New.
(global_binding_level, clear_binding_level): Deleted.
(global_bindings_p): Rework to see if no chain.
(kept_level_p, set_block): Deleted.
(gnat_pushlevel): Renamed from pushlevel and extensive reworked to use
new data structure and work directly on BLOCK node.
(gnat_poplevel): Similarly.
(get_decls): Look at BLOCK_VARS.
(insert_block): Work directly on BLOCK node.
(block_has_var): New function.
(pushdecl): Rework for new binding structures.
(gnat_init_decl_processing): Rename and rework calls to pushlevel and
poplevel.
(build_subprog_body): Likewise.
(end_subprog_body): Likewise; also set up BLOCK in DECL_INITIAL.
* ada-tree.def (DECL_STMT, NULL_STMT): New codes.
* ada-tree.h: (DECL_INIT_BY_ASSIGN_P): New macro.
(DECL_STMT_VAR): Likewise.
2004-05-17 Robert Dewar <dewar@gnat.com>
* restrict.ads, restrict.adb (Process_Restriction_Synonym): New
procedure
* sem_prag.adb (Analyze_Pragma, case Restrictions): Cleanup handling
of restriction synonyums by using
Restrict.Process_Restriction_Synonyms.
* snames.ads, snames.adb: Add entries for Process_Restriction_Synonym
* s-restri.ads (Tasking_Allowed): Correct missing comment
* s-rident.ads: Add entries for restriction synonyms
* ali.adb: Fix some problems with badly formatted ALI files that can
result in infinite loops.
* s-taprop-lynxos.adb, s-tpopsp-lynxos.adb, s-taprop-tru64.adb,
s-tpopsp-posix-foreign.adb, s-taprop-irix.adb, s-interr-sigaction.adb,
s-taprop-irix-athread.adb, s-taprop-hpux-dce.adb, s-taprop-linux.adb,
s-taprop-dummy.adb, s-interr-dummy.adb, s-taprop-os2.adb,
s-taprop-solaris.adb, s-tpopsp-solaris.adb, s-asthan-vms.adb,
s-inmaop-vms.adb, s-interr-vms.adb, s-taprop-vms.adb,
s-tpopde-vms.adb, s-taprop-mingw.adb, s-interr-vxworks.adb,
s-taprop-vxworks.adb, s-tpopsp-vxworks.adb, s-taprop-posix.adb,
s-tpopsp-posix.adb, s-tratas-default.adb, a-dynpri.adb,
a-tasatt.adb, a-taside.adb, a-taside.ads, exp_attr.adb,
exp_ch9.adb, g-thread.adb, rtsfind.ads, sem_attr.adb,
s-interr.adb, s-interr.ads, s-soflin.ads, s-taasde.adb,
s-taasde.ads, s-taenca.adb, s-taenca.ads, s-taprop.ads,
s-tarest.adb, s-tarest.ads, s-tasdeb.adb, s-tasdeb.ads,
s-tasini.adb, s-tasini.ads, s-taskin.adb, s-taskin.ads,
s-tasque.adb, s-tasque.ads, s-tasren.adb, s-tasren.ads,
s-tassta.adb, s-tassta.ads, s-tasuti.adb, s-tasuti.ads,
s-tataat.adb, s-tataat.ads, s-tpinop.adb, s-tpinop.ads,
s-tpoben.adb, s-tpobop.adb, s-tpobop.ads, s-tporft.adb,
s-tposen.adb, s-tposen.ads, s-tratas.adb, s-tratas.ads: Change Task_ID
to Task_Id (minor cleanup).
2004-05-17 Vincent Celier <celier@gnat.com>
* g-os_lib.adb (Normalize_Pathname.Final_Value): Remove trailing
directory separator.
* prj-proc.adb (Recursive_Process): Inherit attribute Languages from
project being extended, if Languages is not declared in extending
project.
2004-05-17 Javier Miranda <miranda@gnat.com>
* sem_ch10.adb (Install_Limited_Withed_Unit): Do not install the
limited view of a visible sibling.
From-SVN: r81935
Diffstat (limited to 'gcc/ada/s-taprop.ads')
-rw-r--r-- | gcc/ada/s-taprop.ads | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/gcc/ada/s-taprop.ads b/gcc/ada/s-taprop.ads index e572a431b5d..dca1c3f8c06 100644 --- a/gcc/ada/s-taprop.ads +++ b/gcc/ada/s-taprop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2002, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2004, 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- -- @@ -38,7 +38,7 @@ with System.Parameters; -- used for Size_Type with System.Tasking; --- used for Task_ID +-- used for Task_Id with System.OS_Interface; -- used for Thread_Id @@ -49,19 +49,19 @@ package System.Task_Primitives.Operations is package ST renames System.Tasking; package OSI renames System.OS_Interface; - procedure Initialize (Environment_Task : ST.Task_ID); + procedure Initialize (Environment_Task : ST.Task_Id); pragma Inline (Initialize); -- This must be called once, before any other subprograms of this -- package are called. procedure Create_Task - (T : ST.Task_ID; + (T : ST.Task_Id; Wrapper : System.Address; Stack_Size : System.Parameters.Size_Type; Priority : System.Any_Priority; Succeeded : out Boolean); pragma Inline (Create_Task); - -- Create a new low-level task with ST.Task_ID T and place other needed + -- Create a new low-level task with ST.Task_Id T and place other needed -- information in the ATCB. -- -- A new thread of control is created, with a stack of at least Stack_Size @@ -69,7 +69,7 @@ package System.Task_Primitives.Operations is -- of control. If Stack_Size = Unspecified_Storage_Size, choose a default -- stack size; this may be effectively "unbounded" on some systems. -- - -- The newly created low-level task is associated with the ST.Task_ID T + -- The newly created low-level task is associated with the ST.Task_Id T -- such that any subsequent call to Self from within the context of the -- low-level task returns T. -- @@ -80,7 +80,7 @@ package System.Task_Primitives.Operations is -- Succeeded is set to true unless creation of the task failed, -- as it may if there are insufficient resources to create another task. - procedure Enter_Task (Self_ID : ST.Task_ID); + procedure Enter_Task (Self_ID : ST.Task_Id); pragma Inline (Enter_Task); -- Initialize data structures specific to the calling task. -- Self must be the ID of the calling task. @@ -96,15 +96,15 @@ package System.Task_Primitives.Operations is -- The effects of further calls to operations defined below -- on the task are undefined thereafter. - function New_ATCB (Entry_Num : ST.Task_Entry_Index) return ST.Task_ID; + function New_ATCB (Entry_Num : ST.Task_Entry_Index) return ST.Task_Id; pragma Inline (New_ATCB); -- Allocate a new ATCB with the specified number of entries. - procedure Initialize_TCB (Self_ID : ST.Task_ID; Succeeded : out Boolean); + procedure Initialize_TCB (Self_ID : ST.Task_Id; Succeeded : out Boolean); pragma Inline (Initialize_TCB); -- Initialize all fields of the TCB - procedure Finalize_TCB (T : ST.Task_ID); + procedure Finalize_TCB (T : ST.Task_Id); pragma Inline (Finalize_TCB); -- Finalizes Private_Data of ATCB, and then deallocates it. -- This is also responsible for recovering any storage or other resources @@ -113,7 +113,7 @@ package System.Task_Primitives.Operations is -- After it is called there should be no further -- reference to the ATCB that corresponds to T. - procedure Abort_Task (T : ST.Task_ID); + procedure Abort_Task (T : ST.Task_Id); pragma Inline (Abort_Task); -- Abort the task specified by T (the target task). This causes -- the target task to asynchronously raise Abort_Signal if @@ -128,7 +128,7 @@ package System.Task_Primitives.Operations is -- ??? modify GNARL to skip wakeup and always call Abort_Task - function Self return ST.Task_ID; + function Self return ST.Task_Id; pragma Inline (Self); -- Return a pointer to the Ada Task Control Block of the calling task. @@ -172,7 +172,7 @@ package System.Task_Primitives.Operations is procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean); procedure Write_Lock (L : access RTS_Lock; Global_Lock : Boolean := False); - procedure Write_Lock (T : ST.Task_ID); + procedure Write_Lock (T : ST.Task_Id); pragma Inline (Write_Lock); -- Lock a lock object for write access. After this operation returns, -- the calling task holds write permission for the lock object. No other @@ -188,7 +188,7 @@ package System.Task_Primitives.Operations is -- For the operation on RTS_Lock, Global_Lock should be set to True -- if L is a global lock (Single_RTS_Lock, Global_Task_Lock). -- - -- For the operation on ST.Task_ID, the lock is the special lock object + -- For the operation on ST.Task_Id, the lock is the special lock object -- associated with that task's ATCB. This lock has effective ceiling -- priority high enough that it is safe to call by a task with any -- priority in the range System.Priority. It is implicitly initialized @@ -212,7 +212,7 @@ package System.Task_Primitives.Operations is -- Write_Lock. This simplifies the implementation, but reduces the level -- of concurrency that can be achieved. -- - -- Note that Read_Lock is not defined for RT_Lock and ST.Task_ID. + -- Note that Read_Lock is not defined for RT_Lock and ST.Task_Id. -- That is because (1) so far Read_Lock has always been implemented -- the same as Write_Lock, (2) most lock usage inside the RTS involves -- potential write access, and (3) implementations of priority ceiling @@ -220,7 +220,7 @@ package System.Task_Primitives.Operations is procedure Unlock (L : access Lock); procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False); - procedure Unlock (T : ST.Task_ID); + procedure Unlock (T : ST.Task_Id); pragma Inline (Unlock); -- Unlock a locked lock object. -- @@ -295,7 +295,7 @@ package System.Task_Primitives.Operations is -- ones. procedure Set_Priority - (T : ST.Task_ID; + (T : ST.Task_Id; Prio : System.Any_Priority; Loss_Of_Inheritance : Boolean := False); pragma Inline (Set_Priority); @@ -311,7 +311,7 @@ package System.Task_Primitives.Operations is -- Loss_Of_Inheritance helps the underlying implementation to do it -- right when the OS doesn't. - function Get_Priority (T : ST.Task_ID) return System.Any_Priority; + function Get_Priority (T : ST.Task_Id) return System.Any_Priority; pragma Inline (Get_Priority); -- Returns the priority last set by Set_Priority for this task. @@ -335,7 +335,7 @@ package System.Task_Primitives.Operations is -- Pending priority changes are handled internally. procedure Sleep - (Self_ID : ST.Task_ID; + (Self_ID : ST.Task_Id; Reason : System.Tasking.Task_States); pragma Inline (Sleep); -- Wait until the current task, T, is signaled to wake up. @@ -358,7 +358,7 @@ package System.Task_Primitives.Operations is -- a Wakeup operation is performed for the same task. procedure Timed_Sleep - (Self_ID : ST.Task_ID; + (Self_ID : ST.Task_Id; Time : Duration; Mode : ST.Delay_Modes; Reason : System.Tasking.Task_States; @@ -367,34 +367,34 @@ package System.Task_Primitives.Operations is -- Combination of Sleep (above) and Timed_Delay procedure Timed_Delay - (Self_ID : ST.Task_ID; + (Self_ID : ST.Task_Id; Time : Duration; Mode : ST.Delay_Modes); -- Implement the semantics of the delay statement. It is assumed that -- the caller is not abort-deferred and does not hold any locks. procedure Wakeup - (T : ST.Task_ID; + (T : ST.Task_Id; Reason : System.Tasking.Task_States); pragma Inline (Wakeup); -- Wake up task T if it is waiting on a Sleep call (of ordinary -- or timed variety), making it ready for execution once again. -- If the task T is not waiting on a Sleep, the operation has no effect. - function Environment_Task return ST.Task_ID; + function Environment_Task return ST.Task_Id; pragma Inline (Environment_Task); -- Return the task ID of the environment task -- Consider putting this into a variable visible directly -- by the rest of the runtime system. ??? - function Get_Thread_Id (T : ST.Task_ID) return OSI.Thread_Id; + function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id; -- Return the thread id of the specified task function Is_Valid_Task return Boolean; pragma Inline (Is_Valid_Task); -- Does the calling thread have an ATCB? - function Register_Foreign_Thread return ST.Task_ID; + function Register_Foreign_Thread return ST.Task_Id; -- Allocate and initialize a new ATCB for the current thread ----------------------- @@ -439,7 +439,7 @@ package System.Task_Primitives.Operations is -- the guard page ourselves, and the procedure Stack_Guard is provided -- for this purpose. - procedure Stack_Guard (T : ST.Task_ID; On : Boolean); + procedure Stack_Guard (T : ST.Task_Id; On : Boolean); -- Ensure guard page is set if one is needed and the underlying thread -- system does not provide it. The procedure is as follows: -- @@ -467,16 +467,16 @@ package System.Task_Primitives.Operations is -- These interfaces have been added to assist in debugging the -- tasking runtime system. - function Check_Exit (Self_ID : ST.Task_ID) return Boolean; + function Check_Exit (Self_ID : ST.Task_Id) return Boolean; pragma Inline (Check_Exit); -- Check that the current task is holding only Global_Task_Lock. - function Check_No_Locks (Self_ID : ST.Task_ID) return Boolean; + function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean; pragma Inline (Check_No_Locks); -- Check that current task is holding no locks. function Suspend_Task - (T : ST.Task_ID; + (T : ST.Task_Id; Thread_Self : OSI.Thread_Id) return Boolean; -- Suspend a specific task when the underlying thread library provides @@ -485,7 +485,7 @@ package System.Task_Primitives.Operations is -- Return True is the operation is successful function Resume_Task - (T : ST.Task_ID; + (T : ST.Task_Id; Thread_Self : OSI.Thread_Id) return Boolean; -- Resume a specific task when the underlying thread library provides |