summaryrefslogtreecommitdiff
path: root/gcc/ada/s-taskin.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-29 11:09:46 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-29 11:09:46 +0000
commit12e90c4403a80eb330785a31627c0aaf52141b0b (patch)
treec6f72c04618eb46b19778035ec894212166d8ea2 /gcc/ada/s-taskin.adb
parent289e4204a7085dddb979dd2f27b34e463b29df13 (diff)
downloadgcc-12e90c4403a80eb330785a31627c0aaf52141b0b.tar.gz
2012-10-29 Tristan Gingold <gingold@adacore.com>
* gnat_rm.texi: Document implementation advice for Pragma Partition_Elaboration_Policy. 2012-10-29 Yannick Moy <moy@adacore.com> * s-bignum.adb (Div_Rem): Reference that Algorithm_D is from the second edition of TAOCP from Knuth, since the algo changed in the third edition. Also correct the definition of 'd' which could overflow. 2012-10-29 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch3.adb (Build_Initialization_Call): Create static strings which denote entry [family] names and associate them with the object's Protection_Entries or ATCB. (Build_Init_Statements): Remove local variable Names. Do not generate the entry [family] names inside the init proc because they are now static. * exp_ch9.adb (Build_Entry_Names): Reimplemented. The strings which denote entry [family] names are now generated statically and associated with the concurrent object's Protection_Entries or ATCB during initialization. * exp_ch9.ads (Build_Entry_Names): Change subprogram profile and associated comment on usage. * rtsfind.ads: Add the following entries to tables RE_Id and RE_Unit_Table: RE_Protected_Entry_Names_Array RE_Task_Entry_Names_Array RO_PE_Number_Of_Entries RO_PE_Set_Entry_Names RO_ST_Number_Of_Entries RO_ST_Set_Entry_Names Remove the following entries from tables RE_Id and RE_Unit_Table: RO_PE_Set_Entry_Name RO_TS_Set_Entry_Name * s-taskin.adb: Remove with clause for Ada.Unchecked_Deallocation. (Free_Entry_Names_Array): Removed. (Number_Of_Entries): New routine. (Set_Entry_Names): New routine. * s-taskin.ads: Rename type Entry_Names_Array to Task_Entry_Names_Array. Rename type Entry_Names_Array_Access to Task_Entry_Names_Access. Update the type of ACTB field Entry_Names and add a comment on its protection status. (Free_Entry_Names_Array): Removed. (Number_Of_Entries): New routine. (Set_Entry_Names): New routine. * s-tassta.adb (Create_Task): Remove formal parameter Build_Entry_Names. Do not allocate an array to hold the string names of entries and families. (Free_Entry_Names): Removed. (Free_Task): Remove the call to Free_Entry_Names. (Set_Entry_Name): Removed. (Vulnerable_Free_Task): Remove the call to Free_Entry_Names. * s-tassta.ads (Create_Task): Remove formal parameter Build_Entry_Names along with associated comment. (Set_Entry_Name): Removed. * s-tpoben.adb: Remove with clause for Ada.Unchecked_Deallocation. (Finalize): Remove the call to Free_Entry_Names. (Free_Entry_Names): Removed. (Initialize_Protection_Entries): Remove formal parameter Build_Entry_Names. Do not allocate an array to hold the string names of entries and families. (Number_Of_Entries): New routine. (Set_Entry_Name): Removed. (Set_Entry_Names): New routine. * s-tpoben.ads: Add types Protected_Entry_Names_Array and Protected_Entry_Names_Access. Update the type of Protection_Enties field Entry_Names. (Initialize_Protection_Entries): Remove formal parameter Build_Entry_Names along with associated comment. (Number_Of_Entries): New routine. (Set_Entry_Name): Removed. (Set_Entry_Names): New routine. 2012-10-29 Arnaud Charlet <charlet@adacore.com> * gnat_ugn.texi: Minor typo fix. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192933 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-taskin.adb')
-rw-r--r--gcc/ada/s-taskin.adb36
1 files changed, 21 insertions, 15 deletions
diff --git a/gcc/ada/s-taskin.adb b/gcc/ada/s-taskin.adb
index 519626cb9c4..00c54ed9e47 100644
--- a/gcc/ada/s-taskin.adb
+++ b/gcc/ada/s-taskin.adb
@@ -33,8 +33,6 @@ pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during tasking
-- operations. It causes infinite loops and other problems.
-with Ada.Unchecked_Deallocation;
-
with System.Task_Primitives.Operations;
with System.Storage_Elements;
@@ -42,19 +40,6 @@ package body System.Tasking is
package STPO renames System.Task_Primitives.Operations;
- ----------------------------
- -- Free_Entry_Names_Array --
- ----------------------------
-
- procedure Free_Entry_Names_Array (Obj : in out Entry_Names_Array) is
- procedure Free_String is new
- Ada.Unchecked_Deallocation (String, String_Access);
- begin
- for Index in Obj'Range loop
- Free_String (Obj (Index));
- end loop;
- end Free_Entry_Names_Array;
-
---------------------
-- Detect_Blocking --
---------------------
@@ -70,6 +55,15 @@ package body System.Tasking is
return GL_Detect_Blocking = 1;
end Detect_Blocking;
+ -----------------------
+ -- Number_Of_Entries --
+ -----------------------
+
+ function Number_Of_Entries (Self_Id : Task_Id) return Task_Entry_Index is
+ begin
+ return Self_Id.Entry_Num;
+ end Number_Of_Entries;
+
----------
-- Self --
----------
@@ -257,4 +251,16 @@ package body System.Tasking is
T.Entry_Calls (1).Self := T;
end Initialize;
+ ---------------------
+ -- Set_Entry_Names --
+ ---------------------
+
+ procedure Set_Entry_Names
+ (Self_Id : Task_Id;
+ Names : Task_Entry_Names_Access)
+ is
+ begin
+ Self_Id.Entry_Names := Names;
+ end Set_Entry_Names;
+
end System.Tasking;