summaryrefslogtreecommitdiff
path: root/gcc/ada/s-taskin.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-09 17:10:03 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-09 17:10:03 +0000
commit0b8fc818b5441eab63489374a3da6b31d648bf58 (patch)
tree8d0ebcc73d5b00e238ee100be97600475908b083 /gcc/ada/s-taskin.ads
parent84301fedaf2400699bafe91b8c405ad5db683b91 (diff)
downloadgcc-0b8fc818b5441eab63489374a3da6b31d648bf58.tar.gz
2005-12-05 Doug Rupp <rupp@adacore.com>
* mlib-tgt-vms-ia64.adb, mlib-tgt-vms-alpha.adb (Is_Interface): Change Ada bind file prefix on VMS from b$ to b__. (Build_Dynamic_Library): Change Init file suffix on VMS from $init to __init. * prj-nmsc.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Object_Suffix): Initialize with target object suffix. (Get_Unit): Change Ada bind file prefix on VMS from b$ to b__. * butil.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. * clean.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Object_Suffix): Initialize with call to Get_Target_Object_Suffix. ({declaraction},Delete_Binder_Generated_Files,{initialization}): Change Ada bind file prefix on VMS from b$ to b__. * gnatlink.adb (Process_Args): Call Add_Src_Search_Dir for -I in --GCC so that Get_Target_Parameters can find system.ads. (Gnatlink): Call Get_Target_Parameters in mainline. Initialize standard packages for Targparm. Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Process_Args): Also Check for object files with target object extension. (Make_Binder_File_Names): Create with target object extension. (Make_Binder_File_Names): Change Ada bind file prefix on VMS from b$ to b__. * mlib-prj.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. ({declaration},Build_Library,Check_Library): Change Ada bind file prefix on VMS from b$ to b__. * osint-b.adb: Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Create_Binder_Output): Change Ada bind file prefix on VMS from b$ to b__. * targext.c: New file. * Makefile.in: add support for vxworks653 builds (../../vxaddr2line): gnatlink with targext.o. (TOOLS_LIBS): Move targext.o to precede libgnat. (init.o, initialize.o): Minor clean up in dependencies. (GNATLINK_OBJS): Add targparm.o, snames.o Add rules fo building targext.o and linking it explicitly with all tools. Also add targext.o to gnatlib. * Make-lang.in: Add rules for building targext.o and linking it in with gnat1 and gnatbind. Add entry for exp_sel.o. * osint.adb Change some Hostparm.OpenVMS checks to Targparm.OpenVMS_On_Target. (Object_File_Name): Use target object suffix. * osint.ads (Object_Suffix): Remove, no longer used. (Target_Object_Suffix): Initialize with target object suffix. * rident.ads: Add special exception to license. * targparm.adb (Get_Target_Parameters): Set the value of Multi_Unit_Index_Character after OpenVMS_On_Target gets its definitive value. (Get_Target_Parameters): Set OpenVMS_On_Target if openvms. * targparm.ads: Add special exception to license. * g-os_lib.ads, g-os_lib.adb (Get_Target_Debuggable_Suffix): New function. (Copy_File): Make sure from file is closed if error on to file (Get_Target_Executable_Suffix, Get_Target_Object_Suffix): New functions. * make.adb (Object_Suffix): Intialize with Get_Target_Object_Suffix. (Executable_Suffix): Intialize with Get_Target_Executable_Suffix. * osint-c.adb (Set_Output_Object_File_Name): Initialize extension with target object suffix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108282 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-taskin.ads')
-rw-r--r--gcc/ada/s-taskin.ads67
1 files changed, 57 insertions, 10 deletions
diff --git a/gcc/ada/s-taskin.ads b/gcc/ada/s-taskin.ads
index e979b7ab13b..da8b8005003 100644
--- a/gcc/ada/s-taskin.ads
+++ b/gcc/ada/s-taskin.ads
@@ -37,7 +37,8 @@
-- Any changes to this interface may require corresponding compiler changes.
with Ada.Exceptions;
--- Used for: Exception_Id
+-- Used for Exception_Id
+-- Exception_Occurrence
with System.Parameters;
-- used for Size_Type
@@ -51,6 +52,9 @@ with System.Soft_Links;
with System.Task_Primitives;
-- used for Private_Data
+with System.Stack_Usage;
+-- used for Stack_Analyzer
+
with Unchecked_Conversion;
package System.Tasking is
@@ -329,6 +333,32 @@ package System.Tasking is
end record;
pragma Suppress_Initialization (Restricted_Entry_Call_Record);
+ -------------------------------------------
+ -- Task termination procedure definition --
+ -------------------------------------------
+
+ -- We need to redefine here these types (already defined in
+ -- Ada.Task_Termination) for avoiding circular dependencies.
+
+ type Cause_Of_Termination is (Normal, Abnormal, Unhandled_Exception);
+ -- Possible causes for task termination:
+ --
+ -- Normal means that the task terminates due to completing the
+ -- last sentence of its body, or as a result of waiting on a
+ -- terminate alternative.
+
+ -- Abnormal means that the task terminates because it is being aborted
+
+ -- handled_Exception means that the task terminates because of exception
+ -- raised by by the execution of its task_body.
+
+ type Termination_Handler is access protected procedure
+ (Cause : in Cause_Of_Termination;
+ T : in Task_Id;
+ X : in Ada.Exceptions.Exception_Occurrence);
+ -- Used to represent protected procedures to be executed when task
+ -- terminates.
+
------------------------------------
-- Task related other definitions --
------------------------------------
@@ -539,6 +569,32 @@ package System.Tasking is
Task_Info : System.Task_Info.Task_Info_Type;
-- System-specific attributes of the task as specified by the
-- Task_Info pragma.
+
+ Analyzer : System.Stack_Usage.Stack_Analyzer;
+ -- For storing informations used to measure the stack usage.
+
+ Global_Task_Lock_Nesting : Natural;
+ -- This is the current nesting level of calls to
+ -- System.Tasking.Initialization.Lock_Task. This allows a task to call
+ -- Lock_Task multiple times without deadlocking. A task only locks
+ -- Global_Task_Lock when its Global_Task_Lock_Nesting goes from 0 to 1,
+ -- and only unlocked when it goes from 1 to 0.
+ --
+ -- Protection: Only accessed by Self
+
+ Fall_Back_Handler : Termination_Handler;
+ pragma Atomic (Fall_Back_Handler);
+ -- This is the fall-back handler that applies to the dependent tasks of
+ -- the task.
+ --
+ -- Protection: atomic access
+
+ Specific_Handler : Termination_Handler;
+ pragma Atomic (Specific_Handler);
+ -- This is the specific handler that applies only to this task, and not
+ -- any of its dependent tasks.
+ --
+ -- Protection: atomic access
end record;
---------------------------------------
@@ -796,15 +852,6 @@ package System.Tasking is
--
-- Protection: Self.L
- Global_Task_Lock_Nesting : Natural := 0;
- -- This is the current nesting level of calls to
- -- System.Tasking.Stages.Lock_Task_T. This allows a task to call
- -- Lock_Task_T multiple times without deadlocking. A task only locks
- -- All_Task_Lock when its All_Tasks_Nesting goes from 0 to 1, and only
- -- unlocked when it goes from 1 to 0.
- --
- -- Protection: Only accessed by Self
-
Open_Accepts : Accept_List_Access;
-- This points to the Open_Accepts array of accept alternatives passed
-- to the RTS by the compiler-generated code to Selective_Wait. It is