diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-26 09:39:19 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-26 09:39:19 +0000 |
commit | f89cc618523e6a25a929727b9f9c63acba8a9e9b (patch) | |
tree | 7e2f7cbd0136adaee94fd2b3f48e6fb17ffc5241 /gcc/ada/s-tassta.ads | |
parent | 4e888ff713661bf82ac200c8e0486b3d6c46ff3d (diff) | |
download | gcc-f89cc618523e6a25a929727b9f9c63acba8a9e9b.tar.gz |
2008-05-26 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Build_Init_Statements): Alphabetize local variables.
Create the statements which map a string name to protected or task
entry indix.
* exp_ch9.adb: Add with and use clause for Stringt.
Minor code reformatting.
(Build_Entry_Names): New routine.
(Make_Initialize_Protection, Make_Task_Create_Call): Generate a value
for flag Build_Entry_Names which controls the allocation of the data
structure for the string names of entries.
* exp_ch9.ads (Build_Entry_Names): New subprogram.
* exp_util.adb (Entry_Names_OK): New function.
* exp_util.ads (Entry_Names_OK): New function.
* rtsfind.ads: Add RO_PE_Set_Entry_Name and RO_TS_Set_Entry_Name to
enumerations RE_Id and RE_Unit_Table.
* s-taskin.adb Add with and use clause for Ada.Unchecked_Deallocation.
(Free_Entry_Names_Array): New routine.
* s-taskin.ads: Comment reformatting.
Add types String_Access, Entry_Names_Array, Entry_Names_Array_Access.
Add component Entry_Names to record Ada_Task_Control_Block.
(Free_Entry_Names_Array): New routine.
* s-tassta.adb (Create_Task): If flag Build_Entry_Names is set,
dynamically allocate an array
of string pointers. This structure holds string entry names.
(Free_Entry_Names): New routine.
(Free_Task, Vulnerable_Free_Task): Deallocate the entry names array.
(Set_Entry_Names): New routine.
* s-tassta.ads:
(Create_Task): Add formal Build_Entry_Names. The flag is used to
control the allocation of the data structure which stores entry names.
(Set_Entry_Name): New routine.
* s-tpoben.adb:
Add with and use clause for Ada.Unchecked_Conversion.
(Finalize): Deallocate the entry names array.
(Free_Entry_Names): New routine.
(Initialize_Protection_Entries): When flag Build_Entry_Names is set,
create an array of string pointers to hold the entry names.
(Set_Entry_Name): New routine.
* s-tpoben.ads:
Add field Entry_Names to record Protection_Entries.
(Initialize_Protection_Entries): Add formal Build_Entry_Names.
(Set_Entry_Name): New routine.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135896 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tassta.ads')
-rw-r--r-- | gcc/ada/s-tassta.ads | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/s-tassta.ads b/gcc/ada/s-tassta.ads index 36f0fbfc3f2..cee2d3b958e 100644 --- a/gcc/ada/s-tassta.ads +++ b/gcc/ada/s-tassta.ads @@ -180,7 +180,8 @@ package System.Tasking.Stages is Elaborated : Access_Boolean; Chain : in out Activation_Chain; Task_Image : String; - Created_Task : out Task_Id); + Created_Task : out Task_Id; + Build_Entry_Names : Boolean); -- Compiler interface only. Do not call from within the RTS. -- This must be called to create a new task. -- @@ -190,7 +191,7 @@ package System.Tasking.Stages is -- Task_Info is the task info associated with the created task, or -- Unspecified_Task_Info if none. -- Relative_Deadline is the relative deadline associated with the created - -- task by means of a pragma Relative_Deadline, or 0.0 if none. + -- task by means of a pragma Relative_Deadline, or 0.0 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 @@ -205,6 +206,8 @@ package System.Tasking.Stages is -- run time can store to ease the debugging and the -- Ada.Task_Identification facility. -- Created_Task is the resulting task. + -- Build_Entry_Names is a flag which controls the allocation of the data + -- structure which stores all entry names. -- -- This procedure can raise Storage_Error if the task creation failed. @@ -276,6 +279,13 @@ package System.Tasking.Stages is -- that doesn't happen, they will never be activated, and will become -- terminated on leaving the return statement. + procedure Set_Entry_Name + (T : Task_Id; + Pos : Task_Entry_Index; + Val : String_Access); + -- This is called by the compiler to map a string which denotes an entry + -- name to a task entry index. + function Terminated (T : Task_Id) return Boolean; -- This is called by the compiler to implement the 'Terminated attribute. -- Though is not required to be so by the ARM, we choose to synchronize |