annotate gcc/ada/sem_ch9.ads @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- S E M _ C H 9 --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 with Table;
kono
parents:
diff changeset
27 with Types; use Types;
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 package Sem_Ch9 is
kono
parents:
diff changeset
30 procedure Analyze_Abort_Statement (N : Node_Id);
kono
parents:
diff changeset
31 procedure Analyze_Accept_Alternative (N : Node_Id);
kono
parents:
diff changeset
32 procedure Analyze_Accept_Statement (N : Node_Id);
kono
parents:
diff changeset
33 procedure Analyze_Asynchronous_Select (N : Node_Id);
kono
parents:
diff changeset
34 procedure Analyze_Conditional_Entry_Call (N : Node_Id);
kono
parents:
diff changeset
35 procedure Analyze_Delay_Alternative (N : Node_Id);
kono
parents:
diff changeset
36 procedure Analyze_Delay_Relative (N : Node_Id);
kono
parents:
diff changeset
37 procedure Analyze_Delay_Until (N : Node_Id);
kono
parents:
diff changeset
38 procedure Analyze_Entry_Body (N : Node_Id);
kono
parents:
diff changeset
39 procedure Analyze_Entry_Body_Formal_Part (N : Node_Id);
kono
parents:
diff changeset
40 procedure Analyze_Entry_Call_Alternative (N : Node_Id);
kono
parents:
diff changeset
41 procedure Analyze_Entry_Declaration (N : Node_Id);
kono
parents:
diff changeset
42 procedure Analyze_Entry_Index_Specification (N : Node_Id);
kono
parents:
diff changeset
43 procedure Analyze_Protected_Body (N : Node_Id);
kono
parents:
diff changeset
44 procedure Analyze_Protected_Definition (N : Node_Id);
kono
parents:
diff changeset
45 procedure Analyze_Protected_Type_Declaration (N : Node_Id);
kono
parents:
diff changeset
46 procedure Analyze_Requeue (N : Node_Id);
kono
parents:
diff changeset
47 procedure Analyze_Selective_Accept (N : Node_Id);
kono
parents:
diff changeset
48 procedure Analyze_Single_Protected_Declaration (N : Node_Id);
kono
parents:
diff changeset
49 procedure Analyze_Single_Task_Declaration (N : Node_Id);
kono
parents:
diff changeset
50 procedure Analyze_Task_Body (N : Node_Id);
kono
parents:
diff changeset
51 procedure Analyze_Task_Definition (N : Node_Id);
kono
parents:
diff changeset
52 procedure Analyze_Task_Type_Declaration (N : Node_Id);
kono
parents:
diff changeset
53 procedure Analyze_Terminate_Alternative (N : Node_Id);
kono
parents:
diff changeset
54 procedure Analyze_Timed_Entry_Call (N : Node_Id);
kono
parents:
diff changeset
55 procedure Analyze_Triggering_Alternative (N : Node_Id);
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 procedure Install_Declarations (Spec : Entity_Id);
kono
parents:
diff changeset
58 -- Make visible in corresponding body the entities defined in a task,
kono
parents:
diff changeset
59 -- protected type declaration, or entry declaration.
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 ------------------------------
kono
parents:
diff changeset
62 -- Lock Free Data Structure --
kono
parents:
diff changeset
63 ------------------------------
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 -- A lock-free subprogram is a protected routine which references a unique
kono
parents:
diff changeset
66 -- protected scalar component and does not contain statements that cause
kono
parents:
diff changeset
67 -- side effects. Due to this restricted behavior, all references to shared
kono
parents:
diff changeset
68 -- data from within the subprogram can be synchronized through the use of
kono
parents:
diff changeset
69 -- atomic operations rather than relying on locks.
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 type Lock_Free_Subprogram is record
kono
parents:
diff changeset
72 Sub_Body : Node_Id;
kono
parents:
diff changeset
73 -- Reference to the body of a protected subprogram which meets the lock-
kono
parents:
diff changeset
74 -- free requirements.
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 Comp_Id : Entity_Id;
kono
parents:
diff changeset
77 -- Reference to the scalar component referenced from within Sub_Body
kono
parents:
diff changeset
78 end record;
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 -- This table establishes a relation between a protected subprogram body
kono
parents:
diff changeset
81 -- and a unique component it references. The table is used when building
kono
parents:
diff changeset
82 -- the lock-free versions of a protected subprogram body.
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 package Lock_Free_Subprogram_Table is new Table.Table (
kono
parents:
diff changeset
85 Table_Component_Type => Lock_Free_Subprogram,
kono
parents:
diff changeset
86 Table_Index_Type => Nat,
kono
parents:
diff changeset
87 Table_Low_Bound => 1,
kono
parents:
diff changeset
88 Table_Initial => 5,
kono
parents:
diff changeset
89 Table_Increment => 5,
kono
parents:
diff changeset
90 Table_Name => "Lock_Free_Subprogram_Table");
kono
parents:
diff changeset
91 end Sem_Ch9;