diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 09:34:40 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 09:34:40 +0000 |
commit | e156dd80c9d5447d470a2a29acff4d97ba2bd355 (patch) | |
tree | 9a03f0f199ae466677c31f5513d269b09fabed84 /gcc/ada/s-taskin.adb | |
parent | bb8d99b2b1e2f1814be4bae532798e43f5ba4093 (diff) | |
download | gcc-e156dd80c9d5447d470a2a29acff4d97ba2bd355.tar.gz |
2009-04-16 Doug Rupp <rupp@adacore.com>
* s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-mingw.adb,
s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
s-taprop-hpux-dce.adb, s-taprop-posix.adb
(Enter_Task): Move Known_Tasks initialization to s-tassta.adb
* s-taprop-vms.adb (Enter_Task): Likewise.
(Initialize): Import DBEXT, Debug_Register. Register DBGEXT callback.
* s-tassta.adb (Activate_Tasks): After task creation set state to
Activating, vice Runnable. Initialize Known_Tasks, moved here from
s-taprop.adb (Enter_Task). Set Debug_Event_Activating for debugger.
Set state to Runnable after above.
(Task_Wrapper): Set Debug_Event_Run. In exception block set
Debug_Event_Terminated.
* s-taskin.ads (Task_States): Add new states Activiting and
Activator_Delay_Sleep.
(Bit_Array, Debug_Event_Array): New types.
(Global_Task_Debug_Event_Set: New flag.
(Common_ATCB): New field Debug_Events.
* s-taskin.adb (Initialize_ATCB): Initialize Debug_Events.
* s-tasren.adb (Timed_Selective_Wait): Set Activator_Delay_Sleep vice
Activator_Sleep.
* s-tasini.adb (Locked_Abort_To_Level): Add case alternatives for when
Activating and when Acceptor_Delay_Sleep.
* s-tasdeb.ads: Add constants for Debug_Events.
(Debug_Event_Kind_Type): New subtype.
(Signal_Debug_Event): New subprogram.
* s-tasdeb.adb (Signal_Debug_Event): New null subprogram.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146155 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-taskin.adb')
-rw-r--r-- | gcc/ada/s-taskin.adb | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/gcc/ada/s-taskin.adb b/gcc/ada/s-taskin.adb index 10ad198bfa2..8cc9d91df25 100644 --- a/gcc/ada/s-taskin.adb +++ b/gcc/ada/s-taskin.adb @@ -62,9 +62,9 @@ package body System.Tasking is function Detect_Blocking return Boolean is GL_Detect_Blocking : Integer; pragma Import (C, GL_Detect_Blocking, "__gl_detect_blocking"); - -- Global variable exported by the binder generated file. - -- A value equal to 1 indicates that pragma Detect_Blocking is active, - -- while 0 is used for the pragma not being present. + -- Global variable exported by the binder generated file. A value equal + -- to 1 indicates that pragma Detect_Blocking is active, while 0 is used + -- for the pragma not being present. begin return GL_Detect_Blocking = 1; @@ -101,7 +101,8 @@ package body System.Tasking is Task_Info : System.Task_Info.Task_Info_Type; Stack_Size : System.Parameters.Size_Type; T : Task_Id; - Success : out Boolean) is + Success : out Boolean) + is begin T.Common.State := Unactivated; @@ -128,14 +129,18 @@ package body System.Tasking is T.Common.Global_Task_Lock_Nesting := 0; T.Common.Fall_Back_Handler := null; T.Common.Specific_Handler := null; + T.Common.Debug_Events := + (False, False, False, False, False, False, False, False, + False, False, False, False, False, False, False, False); + -- Wouldn't (others => False) be clearer ??? if T.Common.Parent = null then - -- For the environment task, the adjusted stack size is - -- meaningless. For example, an unspecified Stack_Size means - -- that the stack size is determined by the environment, or - -- can grow dynamically. The Stack_Checking algorithm - -- therefore needs to use the requested size, or 0 in - -- case of an unknown size. + + -- For the environment task, the adjusted stack size is meaningless. + -- For example, an unspecified Stack_Size means that the stack size + -- is determined by the environment, or can grow dynamically. The + -- Stack_Checking algorithm therefore needs to use the requested + -- size, or 0 in case of an unknown size. T.Common.Compiler_Data.Pri_Stack_Info.Size := Storage_Elements.Storage_Offset (Stack_Size); @@ -161,9 +166,9 @@ package body System.Tasking is Main_Priority : Integer; pragma Import (C, Main_Priority, "__gl_main_priority"); - -- Priority for main task. Note that this is of type Integer, not - -- Priority, because we use the value -1 to indicate the default - -- main priority, and that is of course not in Priority'range. + -- Priority for main task. Note that this is of type Integer, not Priority, + -- because we use the value -1 to indicate the default main priority, and + -- that is of course not in Priority'range. Initialized : Boolean := False; -- Used to prevent multiple calls to Initialize |