summaryrefslogtreecommitdiff
path: root/gcc/ada/s-tarest.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-04 14:51:17 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-04 14:51:17 +0000
commitfb4b35012085b8402e7ccb2f42283fd6ddb347fd (patch)
tree7394d0a56f7edb0d1590b851334f4abd92b00005 /gcc/ada/s-tarest.ads
parent5db81a3464b015386144b428943df1b5a0d12276 (diff)
downloadgcc-fb4b35012085b8402e7ccb2f42283fd6ddb347fd.tar.gz
2004-10-04 Jose Ruiz <ruiz@act-europe.fr>
* targparm.ads, targparm.adb (Targparm_Tags): Add PAS value corresponding to the Preallocated_Stacks flags in System. (Get_Target_Parameters): Including the processing for Preallocated_Stacks. * system.ads, system-vxworks-x86.ads, system-darwin-ppc.ads, system-vms_64.ads, system-unixware.ads, system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads, system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads, system-aix.ads, system-vxworks-sparcv9.ads, system-vxworks-xscale.ads, system-solaris-x86.ads, system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads, system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads, system-os2.ads, system-interix.ads, system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads, system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads, system-vxworks-alpha.ads: Add the flag Preallocated_Stacks, that is used to signal whether the compiler creates the required stacks and descriptors for the different tasks (when True) or it is done by the underlying operating system at run time (when False). It is initially set to False in all targets. * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create the task stack if it is supported by the target. (Make_Task_Create_Call): Pass the stack address if it has been previously created. Otherwise pass a Null_Address. * snames.adb: Add _stack. * snames.ads: Add Name_uStack. Required to allow the expander to statically allocated task stacks. * s-tarest.ads, s-tarest.adb (Create_Restricted_Task): Add Stack_Address argument. Check that its value is equal to Null_Address because this target does not support the static stack allocation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88488 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tarest.ads')
-rw-r--r--gcc/ada/s-tarest.ads36
1 files changed, 25 insertions, 11 deletions
diff --git a/gcc/ada/s-tarest.ads b/gcc/ada/s-tarest.ads
index b8ec7c73bdc..f4aee5c7842 100644
--- a/gcc/ada/s-tarest.ads
+++ b/gcc/ada/s-tarest.ads
@@ -129,6 +129,7 @@ package System.Tasking.Restricted.Stages is
procedure Create_Restricted_Task
(Priority : Integer;
+ Stack_Address : System.Address;
Size : System.Parameters.Size_Type;
Task_Info : System.Task_Info.Task_Info_Type;
State : Task_Procedure_Access;
@@ -141,26 +142,39 @@ package System.Tasking.Restricted.Stages is
-- This must be called to create a new task.
--
-- Priority is the task's priority (assumed to be in the
- -- System.Any_Priority'Range)
+ -- System.Any_Priority'Range)
+ --
+ -- Stack_Address is the start address of the stack associated to the
+ -- task, in case it has been preallocated by the compiler; it is equal
+ -- to Null_Address when the stack needs to be allocated by the
+ -- underlying operating system.
+ --
-- Size is the stack size of the task to create
+ --
-- Task_Info is the task info associated with the created task, or
- -- Unspecified_Task_Info if none.
+ -- Unspecified_Task_Info if none.
+ --
-- State is the compiler generated task's procedure body
+ --
-- Discriminants is a pointer to a limited record whose discriminants
- -- are those of the task to create. This parameter should be passed as
- -- the single argument to State.
+ -- are those of the task to create. This parameter should be passed as
+ -- the single argument to State.
+ --
-- Elaborated is a pointer to a Boolean that must be set to true on exit
- -- if the task could be sucessfully elaborated.
+ -- if the task could be sucessfully elaborated.
+ --
-- Chain is a linked list of task that needs to be created. On exit,
- -- Created_Task.Activation_Link will be Chain.T_ID, and Chain.T_ID
- -- will be Created_Task (e.g the created task will be linked at the front
- -- of Chain).
+ -- Created_Task.Activation_Link will be Chain.T_ID, and Chain.T_ID
+ -- will be Created_Task (e.g the created task will be linked at the front
+ -- of Chain).
+ --
-- Task_Image is a string created by the compiler that the
- -- run time can store to ease the debugging and the
- -- Ada.Task_Identification facility.
+ -- run time can store to ease the debugging and the
+ -- Ada.Task_Identification facility.
+ --
-- Created_Task is the resulting task.
--
- -- This procedure can raise Storage_Error if the task creation failed.
+ -- This procedure can raise Storage_Error if the task creation fails
procedure Activate_Restricted_Tasks
(Chain_Access : Activation_Chain_Access);