1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
27 with Types
; use Types
;
30 procedure Analyze_Abort_Statement
(N
: Node_Id
);
31 procedure Analyze_Accept_Alternative
(N
: Node_Id
);
32 procedure Analyze_Accept_Statement
(N
: Node_Id
);
33 procedure Analyze_Asynchronous_Select
(N
: Node_Id
);
34 procedure Analyze_Conditional_Entry_Call
(N
: Node_Id
);
35 procedure Analyze_Delay_Alternative
(N
: Node_Id
);
36 procedure Analyze_Delay_Relative
(N
: Node_Id
);
37 procedure Analyze_Delay_Until
(N
: Node_Id
);
38 procedure Analyze_Entry_Body
(N
: Node_Id
);
39 procedure Analyze_Entry_Body_Formal_Part
(N
: Node_Id
);
40 procedure Analyze_Entry_Call_Alternative
(N
: Node_Id
);
41 procedure Analyze_Entry_Declaration
(N
: Node_Id
);
42 procedure Analyze_Entry_Index_Specification
(N
: Node_Id
);
43 procedure Analyze_Protected_Body
(N
: Node_Id
);
44 procedure Analyze_Protected_Definition
(N
: Node_Id
);
45 procedure Analyze_Protected_Type_Declaration
(N
: Node_Id
);
46 procedure Analyze_Requeue
(N
: Node_Id
);
47 procedure Analyze_Selective_Accept
(N
: Node_Id
);
48 procedure Analyze_Single_Protected_Declaration
(N
: Node_Id
);
49 procedure Analyze_Single_Task_Declaration
(N
: Node_Id
);
50 procedure Analyze_Task_Body
(N
: Node_Id
);
51 procedure Analyze_Task_Definition
(N
: Node_Id
);
52 procedure Analyze_Task_Type_Declaration
(N
: Node_Id
);
53 procedure Analyze_Terminate_Alternative
(N
: Node_Id
);
54 procedure Analyze_Timed_Entry_Call
(N
: Node_Id
);
55 procedure Analyze_Triggering_Alternative
(N
: Node_Id
);
57 procedure Install_Declarations
(Spec
: Entity_Id
);
58 -- Make visible in corresponding body the entities defined in a task,
59 -- protected type declaration, or entry declaration.
61 procedure Install_Discriminants
(E
: Entity_Id
);
62 -- Make visible the discriminants of type entity E
64 procedure Push_Scope_And_Install_Discriminants
(E
: Entity_Id
);
65 -- Push scope E and makes visible the discriminants of type entity E if E
68 procedure Uninstall_Discriminants
(E
: Entity_Id
);
69 -- Remove visibility to the discriminants of type entity E
71 procedure Uninstall_Discriminants_And_Pop_Scope
(E
: Entity_Id
);
72 -- Remove visibility to the discriminants of type entity E and pop the
73 -- scope stack if E has discriminants.
75 ------------------------------
76 -- Lock Free Data Structure --
77 ------------------------------
79 -- A lock-free subprogram is a protected routine which references a unique
80 -- protected scalar component and does not contain statements that cause
81 -- side effects. Due to this restricted behavior, all references to shared
82 -- data from within the subprogram can be synchronized through the use of
83 -- atomic operations rather than relying on locks.
85 type Lock_Free_Subprogram
is record
87 -- Reference to the body of a protected subprogram which meets the lock-
91 -- Reference to the scalar component referenced from within Sub_Body
94 -- This table establishes a relation between a protected subprogram body
95 -- and a unique component it references. The table is used when building
96 -- the lock-free versions of a protected subprogram body.
98 package Lock_Free_Subprogram_Table
is new Table
.Table
(
99 Table_Component_Type
=> Lock_Free_Subprogram
,
100 Table_Index_Type
=> Nat
,
101 Table_Low_Bound
=> 1,
103 Table_Increment
=> 5,
104 Table_Name
=> "Lock_Free_Subprogram_Table");