diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-25 15:17:25 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-25 15:17:25 +0000 |
commit | f572eafb46e7e4db7a058b9199a41300cac12301 (patch) | |
tree | fb430d94bc43da0b5a140cd3a1e77684ce6e44dc /gcc/ada/exp_ch9.adb | |
parent | e12ab46d570d8d37cf186f06027a1d9a1cb607e9 (diff) | |
download | gcc-f572eafb46e7e4db7a058b9199a41300cac12301.tar.gz |
2012-04-25 Gary Dismukes <dismukes@adacore.com>
* exp_ch9.adb: Add comments on the usage of the
lock-free data structures.
2012-04-25 Vincent Pucci <pucci@adacore.com>
* exp_intr.adb (Expand_Shift): Convert the left
operand and the operator when the type of the call differs from
the type of the operator.
2012-04-25 Geert Bosch <bosch@adacore.com>
* stand.ads: Minor comment fix.
2012-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch4.adb (Analyze_Slice): Handle the case where the prefix
is a string literal. Retrieve the first index from the base type
when slicing a string literal.
* sem_ch12.adb (Check_Private_View): Move the initialization
of the type inside the loop to reflect the changing index.
* sem_eval.adb (Eval_Relational_Op): Retrieve the first index
from the base type when dealing with a string literal.
* sem_res.adb (Resolve_Slice): Retrieve the first index from
the base type when slicing a string literal.
* sem_util.adb (Is_Internally_Generated_Renaming): New routine.
(Is_Object_Reference): String literals may act
as object references only when they are renamed internally.
(Proper_First_Index): New routine.
* sem_util.ads (Proper_First_Index): New routine.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186829 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch9.adb')
-rw-r--r-- | gcc/ada/exp_ch9.adb | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index d926abe766d..9d21af2accc 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -81,16 +81,24 @@ package body Exp_Ch9 is -- Lock Free Data Structure -- ------------------------------ + -- A lock-free subprogram is a protected routine which references a unique + -- protected scalar component and does not contain statements that cause + -- side effects. Due to this restricted behavior, all references to shared + -- data from within the subprogram can be synchronized through the use of + -- atomic operations rather than relying on locks. + type Lock_Free_Subprogram is record Sub_Body : Node_Id; - Comp_Id : Entity_Id; + -- Reference to the body of a protected subprogram which meets the lock- + -- free requirements. + + Comp_Id : Entity_Id; + -- Reference to the scalar component referenced from within Sub_Body end record; - -- This data structure and its fields must be documented, ALL global - -- data structures must be documented. We never rely on guessing what - -- things mean from their names. - -- The following table establishes a relation between a subprogram body and - -- an unique protected component referenced in this body. + -- This table establishes a relation between a protected subprogram body + -- and a unique component it references. The table is used when building + -- the lock-free versions of a protected subprogram body. package Lock_Free_Subprogram_Table is new Table.Table ( Table_Component_Type => Lock_Free_Subprogram, |