1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2019, 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 ------------------------------
62 -- Lock Free Data Structure --
63 ------------------------------
65 -- A lock-free subprogram is a protected routine which references a unique
66 -- protected scalar component and does not contain statements that cause
67 -- side effects. Due to this restricted behavior, all references to shared
68 -- data from within the subprogram can be synchronized through the use of
69 -- atomic operations rather than relying on locks.
71 type Lock_Free_Subprogram is record
73 -- Reference to the body of a protected subprogram which meets the lock-
77 -- Reference to the scalar component referenced from within Sub_Body
80 -- This table establishes a relation between a protected subprogram body
81 -- and a unique component it references. The table is used when building
82 -- the lock-free versions of a protected subprogram body.
84 package Lock_Free_Subprogram_Table is new Table.Table (
85 Table_Component_Type => Lock_Free_Subprogram,
86 Table_Index_Type => Nat,
90 Table_Name => "Lock_Free_Subprogram_Table");