OSDN Git Service

PR 33870
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-tasdeb.ads
index 548df9e..9aebe94 100644 (file)
@@ -1,12 +1,12 @@
 ------------------------------------------------------------------------------
 --                                                                          --
---                 GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS              --
+--                  GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS                --
 --                                                                          --
 --                  S Y S T E M . T A S K I N G . D E B U G                 --
 --                                                                          --
 --                                  S p e c                                 --
 --                                                                          --
---          Copyright (C) 1997-2004, Free Software Foundation, Inc.         --
+--          Copyright (C) 1997-2007, 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- --
@@ -16,8 +16,8 @@
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
 -- Public License  distributed with GNARL; see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- As a special exception,  if other files  instantiate  generics from this --
 -- unit, or you link  this unit with other files  to produce an executable, --
@@ -38,6 +38,7 @@ with System.Tasking;
 with System.OS_Interface;
 
 package System.Tasking.Debug is
+   pragma Preelaborate;
 
    ------------------------------------------
    -- Application-level debugging routines --
@@ -52,12 +53,12 @@ package System.Tasking.Debug is
    --  the standard error file.
 
    procedure Print_Task_Info (T : Task_Id);
-   --  Similar to Print_Current_Task, for a given task.
+   --  Similar to Print_Current_Task, for a given task
 
    procedure Set_User_State (Value : Long_Integer);
-   --  Set user state value in the current task.
-   --  This state will be displayed when calling List_Tasks or
-   --  Print_Current_Task. It is useful for setting task specific state.
+   --  Set user state value in the current task. This state will be displayed
+   --  when calling List_Tasks or Print_Current_Task. It is useful for setting
+   --  task specific state.
 
    function Get_User_State return Long_Integer;
    --  Return the user state for the current task.
@@ -66,9 +67,9 @@ package System.Tasking.Debug is
    -- General GDB support --
    -------------------------
 
-   Known_Tasks : array (0 .. 999) of Task_Id;
-   --  Global array of tasks read by gdb, and updated by
-   --  Create_Task and Finalize_TCB
+   Known_Tasks : array (0 .. 999) of Task_Id := (others => null);
+   --  Global array of tasks read by gdb, and updated by Create_Task and
+   --  Finalize_TCB
 
    ----------------------------------
    -- VxWorks specific GDB support --
@@ -78,11 +79,11 @@ package System.Tasking.Debug is
    --  manner, only VxWorks currently uses them.
 
    procedure Task_Creation_Hook (Thread : OS_Interface.Thread_Id);
-   --  This procedure is used to notify GDB of task's creation.
-   --  It must be called by the task's creator.
+   --  This procedure is used to notify GDB of task's creation. It must be
+   --  called by the task's creator.
 
    procedure Task_Termination_Hook;
-   --  This procedure is used to notify GDB of task's termination.
+   --  This procedure is used to notify GDB of task's termination
 
    procedure Suspend_All_Tasks (Thread_Self : OS_Interface.Thread_Id);
    --  Suspend all the tasks except the one whose associated thread is
@@ -94,6 +95,19 @@ package System.Tasking.Debug is
    --  Thread_Self by traversing All_Tasks_Lists and calling
    --  System.Task_Primitives.Operations.Continue_Task.
 
+   procedure Stop_All_Tasks_Handler;
+   --  Stop all the tasks by traversing All_Tasks_Lists and calling
+   --  System.Task_Primitives.Operations.Stop_All_Task. This function
+   --  can be used in an interrupt handler.
+
+   procedure Stop_All_Tasks;
+   --  Stop all the tasks by traversing All_Tasks_Lists and calling
+   --  System.Task_Primitives.Operations.Stop_Task.
+
+   procedure Continue_All_Tasks;
+   --  Continue all the tasks by traversing All_Tasks_Lists and calling
+   --  System.Task_Primitives.Operations.Continue_Task.
+
    -------------------------------
    -- Run-time tracing routines --
    -------------------------------
@@ -110,8 +124,7 @@ package System.Tasking.Debug is
    procedure Set_Trace
      (Flag  : Character;
       Value : Boolean := True);
-   --  Enable or disable tracing for Flag.
-   --  By default, flags in the range 'A' .. 'Z' are disabled, others are
-   --  enabled.
+   --  Enable or disable tracing for Flag. By default, flags in the range
+   --  'A' .. 'Z' are disabled, others are enabled.
 
 end System.Tasking.Debug;