-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2010, 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- --
with System.Soft_Links;
with System.Task_Primitives;
with System.Stack_Usage;
+with System.Multiprocessors;
package System.Tasking is
pragma Preelaborate;
Cancelled
-- the call was asynchronous, and was cancelled
);
+ pragma Ordered (Entry_Call_State);
- -- Never_Abortable is used for calls that are made in a abort
- -- deferred region (see ARM 9.8(5-11), 9.8 (20)).
- -- Such a call is never abortable.
+ -- Never_Abortable is used for calls that are made in a abort deferred
+ -- region (see ARM 9.8(5-11), 9.8 (20)). Such a call is never abortable.
- -- The Was_ vs. Not_Yet_ distinction is needed to decide whether it
- -- is OK to advance into the abortable part of an async. select stmt.
- -- That is allowed iff the mode is Now_ or Was_.
+ -- The Was_ vs. Not_Yet_ distinction is needed to decide whether it is OK
+ -- to advance into the abortable part of an async. select stmt. That is
+ -- allowed iff the mode is Now_ or Was_.
- -- Done indicates the call has been completed, without cancellation,
- -- or no call has been made yet at this ATC nesting level,
- -- and so aborting the call is no longer an issue.
- -- Completion of the call does not necessarily indicate "success";
- -- the call may be returning an exception if Exception_To_Raise is
- -- non-null.
+ -- Done indicates the call has been completed, without cancellation, or no
+ -- call has been made yet at this ATC nesting level, and so aborting the
+ -- call is no longer an issue. Completion of the call does not necessarily
+ -- indicate "success"; the call may be returning an exception if
+ -- Exception_To_Raise is non-null.
- -- Cancelled indicates the call was cancelled,
- -- and so aborting the call is no longer an issue.
+ -- Cancelled indicates the call was cancelled, and so aborting the call is
+ -- no longer an issue.
- -- The call is on an entry queue unless
- -- State >= Done, in which case it may or may not be still Onqueue.
+ -- The call is on an entry queue unless State >= Done, in which case it may
+ -- or may not be still Onqueue.
- -- Please do not modify the order of the values, without checking
- -- all uses of this type. We rely on partial "monotonicity" of
- -- Entry_Call_Record.State to avoid locking when we access this
- -- value for certain tests. In particular:
+ -- Please do not modify the order of the values, without checking all uses
+ -- of this type. We rely on partial "monotonicity" of
+ -- Entry_Call_Record.State to avoid locking when we access this value for
+ -- certain tests. In particular:
-- 1) Once State >= Done, we can rely that the call has been
-- completed. If State >= Done, it will not
--
-- Protection: Only written by Self, accessed by anyone
+ Base_CPU : System.Multiprocessors.CPU_Range;
+ -- Base CPU, only changed via dispatching domains package.
+ --
+ -- Protection: Self.L
+
Current_Priority : System.Any_Priority;
-- Active priority, except that the effects of protected object
-- priority ceilings are not reflected. This only reflects explicit
Independent_Task_Level : constant Master_Level := 2;
Library_Task_Level : constant Master_Level := 3;
- ------------------------------
- -- Task size, priority info --
- ------------------------------
+ -------------------
+ -- Priority info --
+ -------------------
Unspecified_Priority : constant Integer := System.Priority'First - 1;
subtype Rendezvous_Priority is Integer
range Priority_Not_Boosted .. System.Any_Priority'Last;
+ -------------------
+ -- Affinity info --
+ -------------------
+
+ Unspecified_CPU : constant := -1;
+ -- No affinity specified
+
------------------------------------
-- Rendezvous related definitions --
------------------------------------
type Direct_Index is range 0 .. Parameters.Default_Attribute_Count;
subtype Direct_Index_Range is Direct_Index range 1 .. Direct_Index'Last;
- -- Attributes with indices in this range are stored directly in the task
+ -- Attributes with indexes in this range are stored directly in the task
-- control block. Such attributes must be Address-sized. Other attributes
-- will be held in dynamically allocated records chained off of the task
-- control block.
Parent : Task_Id;
Elaborated : Access_Boolean;
Base_Priority : System.Any_Priority;
+ Base_CPU : System.Multiprocessors.CPU_Range;
Task_Info : System.Task_Info.Task_Info_Type;
Stack_Size : System.Parameters.Size_Type;
T : Task_Id;