* s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
s-taprop-hpux-dce.adb, s-taprop-linux.adb, s-taprop-dummy.adb,
s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
s-taprop-posix.adb (Stop_Task): New function, dummy implementation.
* s-taprop.ads, s-taprop-vxworks.adb (Stop_Task): New function.
* s-tasdeb.adb (Stop_All_Tasks): New function, implementing a run-time
function which can be called by the debugger to interrupt the tasks of
an Ada application asynchronously, as needed on VxWorks.
(Stop_All_Tasks_Handler): Renamed from Stop_All_Tasks.
* s-tasdeb.ads (Stop_All_Tasks_Handler): New function declaration,
renamed from Stop_All_Tasks. Update comments.
(Stop_All_tasks): New function declaration.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128781
138bc75d-0d04-0410-961f-
82ee72b054a4
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
------------------------
-- Suspend_Until_True --
------------------------
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
null;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ pragma Unreferenced (T);
+ begin
+ return False;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
Dummy := Int_Unlock;
end Stop_All_Tasks;
+ ---------------
+ -- Stop_Task --
+ ---------------
+
+ function Stop_Task (T : ST.Task_Id) return Boolean is
+ begin
+ if T.Common.LL.Thread /= 0 then
+ return Task_Stop (T.Common.LL.Thread) = 0;
+ else
+ return True;
+ end if;
+ end Stop_Task;
+
-------------------
-- Continue_Task --
-------------------
function Suspend_Task
(T : ST.Task_Id;
Thread_Self : OSI.Thread_Id) return Boolean;
- -- Suspend a specific task when the underlying thread library provides
- -- such functionality, unless the thread associated with T is Thread_Self.
- -- Such functionality is needed by gdb on some targets (e.g VxWorks)
- -- Return True is the operation is successful
+ -- Suspend a specific task when the underlying thread library provides this
+ -- functionality, unless the thread associated with T is Thread_Self. Such
+ -- functionality is needed by gdb on some targets (e.g VxWorks) Return True
+ -- is the operation is successful. On targets where this operation is not
+ -- available, a dummy body is present which always returns False.
function Resume_Task
(T : ST.Task_Id;
-- VxWorks) This function can be run from an interrupt handler. Return True
-- is the operation is successful
+ function Stop_Task (T : ST.Task_Id) return Boolean;
+ -- Stop a specific task when the underlying thread library provides
+ -- such functionality. Such functionality is needed by gdb on some targets
+ -- (e.g VxWorks). Return True is the operation is successful.
+
function Continue_Task (T : ST.Task_Id) return Boolean;
-- Continue a specific task when the underlying thread library provides
-- such functionality. Such functionality is needed by gdb on some targets
--------------------
procedure Stop_All_Tasks is
+ C : Task_Id;
+
+ Dummy : Boolean;
+ pragma Unreferenced (Dummy);
+
begin
- STPO.Stop_All_Tasks;
+ STPO.Lock_RTS;
+
+ C := All_Tasks_List;
+ while C /= null loop
+ Dummy := STPO.Stop_Task (C);
+ C := C.Common.All_Tasks_Link;
+ end loop;
+
+ STPO.Unlock_RTS;
end Stop_All_Tasks;
+ ----------------------------
+ -- Stop_All_Tasks_Handler --
+ ----------------------------
+
+ procedure Stop_All_Tasks_Handler is
+ begin
+ STPO.Stop_All_Tasks;
+ end Stop_All_Tasks_Handler;
+
-----------------------
-- Suspend_All_Tasks --
-----------------------
-- Thread_Self by traversing All_Tasks_Lists and calling
-- System.Task_Primitives.Operations.Continue_Task.
- procedure Stop_All_Tasks;
+ procedure Stop_All_Tasks_Handler;
-- Stop all the tasks by traversing All_Tasks_Lists and calling
- -- System.Task_Primitives.Operations.Stop_Task. This function
+ -- System.Task_Primitives.Operations.Stop_All_Task. This function
-- can be used in a 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. This function
- -- can be used in a interrupt handler.
+ -- System.Task_Primitives.Operations.Continue_Task.
-------------------------------
-- Run-time tracing routines --