-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, 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- --
-- --
------------------------------------------------------------------------------
--- This package contains all the GNULL primitives that interface directly
--- with the underlying OS.
+-- This package contains all the GNULL primitives that interface directly with
+-- the underlying OS.
with System.Parameters;
--- used for Size_Type
-
with System.Tasking;
--- used for Task_Id
-
with System.OS_Interface;
--- used for Thread_Id
package System.Task_Primitives.Operations is
pragma Preelaborate;
-- It is not clear what to do about ceiling violations due to RTS calls
-- done at interrupt priority. In general, it is not acceptable to give
- -- all RTS locks interrupt priority, since that whould give terrible
+ -- all RTS locks interrupt priority, since that would give terrible
-- performance on systems where this has the effect of masking hardware
-- interrupts, though we could get away allowing Interrupt_Priority'last
-- where we are layered on an OS that does not allow us to mask interrupts.
-- thread of control in the RTS. Since we intend these routines to be used
-- for implementing the Single_Lock RTS, Lock_RTS should follow the first
-- Defer_Abort operation entering RTS. In the same fashion Unlock_RTS
- -- should preceed the last Undefer_Abort exiting RTS.
+ -- should precede the last Undefer_Abort exiting RTS.
--
-- These routines also replace the functions Lock/Unlock_All_Tasks_List
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