summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/s-taprop-dummy.adb10
-rw-r--r--gcc/ada/s-taprop-hpux-dce.adb10
-rw-r--r--gcc/ada/s-taprop-irix.adb10
-rw-r--r--gcc/ada/s-taprop-linux.adb10
-rw-r--r--gcc/ada/s-taprop-lynxos.adb10
-rw-r--r--gcc/ada/s-taprop-mingw.adb10
-rw-r--r--gcc/ada/s-taprop-posix.adb10
-rw-r--r--gcc/ada/s-taprop-solaris.adb10
-rw-r--r--gcc/ada/s-taprop-tru64.adb10
-rw-r--r--gcc/ada/s-taprop-vms.adb10
-rw-r--r--gcc/ada/s-taprop-vxworks.adb13
-rw-r--r--gcc/ada/s-taprop.ads14
-rw-r--r--gcc/ada/s-tasdeb.adb24
-rw-r--r--gcc/ada/s-tasdeb.ads11
14 files changed, 153 insertions, 9 deletions
diff --git a/gcc/ada/s-taprop-dummy.adb b/gcc/ada/s-taprop-dummy.adb
index 88d97680ba3..a64a61cd9dd 100644
--- a/gcc/ada/s-taprop-dummy.adb
+++ b/gcc/ada/s-taprop-dummy.adb
@@ -401,6 +401,16 @@ package body System.Task_Primitives.Operations is
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 --
------------------------
diff --git a/gcc/ada/s-taprop-hpux-dce.adb b/gcc/ada/s-taprop-hpux-dce.adb
index 9b5d449f525..33ca89bf378 100644
--- a/gcc/ada/s-taprop-hpux-dce.adb
+++ b/gcc/ada/s-taprop-hpux-dce.adb
@@ -1194,6 +1194,16 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop-irix.adb b/gcc/ada/s-taprop-irix.adb
index aec5d802548..62264cad1d5 100644
--- a/gcc/ada/s-taprop-irix.adb
+++ b/gcc/ada/s-taprop-irix.adb
@@ -1274,6 +1274,16 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop-linux.adb b/gcc/ada/s-taprop-linux.adb
index 4f5fe8f0bff..b30fb247617 100644
--- a/gcc/ada/s-taprop-linux.adb
+++ b/gcc/ada/s-taprop-linux.adb
@@ -1215,6 +1215,16 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop-lynxos.adb b/gcc/ada/s-taprop-lynxos.adb
index d6abf8abfed..8693fed7ced 100644
--- a/gcc/ada/s-taprop-lynxos.adb
+++ b/gcc/ada/s-taprop-lynxos.adb
@@ -1342,6 +1342,16 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop-mingw.adb b/gcc/ada/s-taprop-mingw.adb
index 603e2430378..b8ebc814387 100644
--- a/gcc/ada/s-taprop-mingw.adb
+++ b/gcc/ada/s-taprop-mingw.adb
@@ -1301,6 +1301,16 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop-posix.adb b/gcc/ada/s-taprop-posix.adb
index baae9408750..e0c35b52b99 100644
--- a/gcc/ada/s-taprop-posix.adb
+++ b/gcc/ada/s-taprop-posix.adb
@@ -1357,6 +1357,16 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop-solaris.adb b/gcc/ada/s-taprop-solaris.adb
index 823d9f48a8d..26dab87029c 100644
--- a/gcc/ada/s-taprop-solaris.adb
+++ b/gcc/ada/s-taprop-solaris.adb
@@ -1957,6 +1957,16 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop-tru64.adb b/gcc/ada/s-taprop-tru64.adb
index 75d54eb8bdf..975bae11f4f 100644
--- a/gcc/ada/s-taprop-tru64.adb
+++ b/gcc/ada/s-taprop-tru64.adb
@@ -1289,6 +1289,16 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop-vms.adb b/gcc/ada/s-taprop-vms.adb
index 9652ce6bf3f..0647b21c981 100644
--- a/gcc/ada/s-taprop-vms.adb
+++ b/gcc/ada/s-taprop-vms.adb
@@ -1218,6 +1218,16 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop-vxworks.adb b/gcc/ada/s-taprop-vxworks.adb
index 7ba1ba5d9c1..51e7f0cac18 100644
--- a/gcc/ada/s-taprop-vxworks.adb
+++ b/gcc/ada/s-taprop-vxworks.adb
@@ -1311,6 +1311,19 @@ package body System.Task_Primitives.Operations is
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 --
-------------------
diff --git a/gcc/ada/s-taprop.ads b/gcc/ada/s-taprop.ads
index d7dc0f70247..d45ef18b990 100644
--- a/gcc/ada/s-taprop.ads
+++ b/gcc/ada/s-taprop.ads
@@ -520,10 +520,11 @@ package System.Task_Primitives.Operations is
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;
@@ -539,6 +540,11 @@ package System.Task_Primitives.Operations is
-- 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
diff --git a/gcc/ada/s-tasdeb.adb b/gcc/ada/s-tasdeb.adb
index 0dc102737fe..05719426d24 100644
--- a/gcc/ada/s-tasdeb.adb
+++ b/gcc/ada/s-tasdeb.adb
@@ -252,10 +252,32 @@ package body System.Tasking.Debug is
--------------------
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 --
-----------------------
diff --git a/gcc/ada/s-tasdeb.ads b/gcc/ada/s-tasdeb.ads
index 6f167386935..72f3954a9d5 100644
--- a/gcc/ada/s-tasdeb.ads
+++ b/gcc/ada/s-tasdeb.ads
@@ -95,15 +95,18 @@ package System.Tasking.Debug is
-- 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 --