OSDN Git Service

New Language: Ada
[pf3gnuchains/gcc-fork.git] / gcc / ada / exp_smem.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                             E X P _ S M E M                              --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --                            $Revision: 1.3 $                              --
10 --                                                                          --
11 --           Copyright (C) 1998-2000, Free Software Foundation, Inc.        --
12 --                                                                          --
13 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- GNAT was originally developed  by the GNAT team at  New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
26 --                                                                          --
27 ------------------------------------------------------------------------------
28
29 --  This package contains routines involved in the required expansions for
30 --  handling shared memory accesses for variables in Shared_Passive packages.
31
32 --  See detailed documentation in System.Shared_Storage spec for a full
33 --  description of the approach that is taken for handling distributed
34 --  shared memory. This expansion unit in the compiler is responsible
35 --  for generating the calls to routines in System.Shared_Storage.
36
37 with Types; use Types;
38 package Exp_Smem is
39
40    procedure Expand_Shared_Passive_Variable (N : Node_Id);
41    --  N is the identifier for a shared passive variable. This routine is
42    --  responsible for determining if this is an assigned to N, or a
43    --  reference to N, and generating the required calls to the shared
44    --  memory read/write procedures.
45
46    procedure Add_Shared_Var_Lock_Procs (N : Node_Id);
47    --  The argument is a protected subprogram call, before it is rewritten
48    --  by Exp_Ch9.Build_Protected_Subprogram_Call. This routine, which is
49    --  called only in the case of an external call to a protected object
50    --  that has Is_Shared_Passive set, deals with installing the required
51    --  global lock calls for this case. It also generates the necessary
52    --  read/write calls for the protected object within the lock region.
53
54    procedure Make_Shared_Var_Procs (N : Node_Id);
55    --  N is the node for the declaration of a shared passive variable. This
56    --  procedure constructs and inserts the read and assignment procedures
57    --  for the shared memory variable. See System.Shared_Storage for a full
58    --  description of these procedures and how they are used.
59
60 end Exp_Smem;