annotate gcc/ada/exp_smem.ads @ 120:f93fa5091070

fix conv1.c
author mir3636
date Thu, 08 Mar 2018 14:53:42 +0900
parents 04ced10e8804
children 84e7813d76e9
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 -- E X P _ S M E M --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
kono
parents:
diff changeset
9 -- Copyright (C) 1998-2014, Free Software Foundation, Inc. --
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 -- This package contains routines involved in the required expansions for
kono
parents:
diff changeset
27 -- handling shared memory accesses for variables in Shared_Passive packages.
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 -- See detailed documentation in System.Shared_Storage spec for a full
kono
parents:
diff changeset
30 -- description of the approach that is taken for handling distributed
kono
parents:
diff changeset
31 -- shared memory. This expansion unit in the compiler is responsible
kono
parents:
diff changeset
32 -- for generating the calls to routines in System.Shared_Storage.
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 with Types; use Types;
kono
parents:
diff changeset
35 package Exp_Smem is
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 procedure Expand_Shared_Passive_Variable (N : Node_Id);
kono
parents:
diff changeset
38 -- N is the identifier for a shared passive variable. This routine is
kono
parents:
diff changeset
39 -- responsible for determining if this is an assigned to N, or a
kono
parents:
diff changeset
40 -- reference to N, and generating the required calls to the shared
kono
parents:
diff changeset
41 -- memory read/write procedures.
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 procedure Add_Shared_Var_Lock_Procs (N : Node_Id);
kono
parents:
diff changeset
44 -- The argument is a protected subprogram call, before it is rewritten
kono
parents:
diff changeset
45 -- by Exp_Ch9.Build_Protected_Subprogram_Call. This routine, which is
kono
parents:
diff changeset
46 -- called only in the case of an external call to a protected object
kono
parents:
diff changeset
47 -- that has Is_Shared_Passive set, deals with installing a transient scope
kono
parents:
diff changeset
48 -- and acquiring the appropriate global lock calls for this case. It also
kono
parents:
diff changeset
49 -- generates the necessary read/write calls for the protected object within
kono
parents:
diff changeset
50 -- the lock region.
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 function Make_Shared_Var_Procs (N : Node_Id) return Node_Id;
kono
parents:
diff changeset
53 -- N is the node for the declaration of a shared passive variable.
kono
parents:
diff changeset
54 -- This procedure constructs an instantiation of
kono
parents:
diff changeset
55 -- System.Shared_Storage.Shared_Var_Procs that contains the read and
kono
parents:
diff changeset
56 -- assignment procedures for the shared memory variable.
kono
parents:
diff changeset
57 -- See System.Shared_Storage for a full description of these procedures
kono
parents:
diff changeset
58 -- and how they are used. The last inserted node is returned.
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 end Exp_Smem;