source: rtems/cpukit/score/include/rtems/score/objectmp.h @ be650a84

4.104.114.84.95
Last change on this file since be650a84 was be650a84, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 21, 1995 at 4:22:25 PM

moving files around

  • Property mode set to 100644
File size: 4.2 KB
Line 
1/*  objectmp.h
2 *
3 *  This include file contains all the constants and structures associated
4 *  with the manipulation of Global RTEMS Objects.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __RTEMS_OBJECTS_MP_h
18#define __RTEMS_OBJECTS_MP_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/*
25 *  This defines the Global Object Control Block used to manage
26 *  objects resident on other nodes.
27 */
28
29typedef struct {
30  Objects_Control Object;
31  unsigned32      name;     /* XXX broken but works */
32  /* XXX If any API is MP with variable length names .. BOOM!!!! */
33}   Objects_MP_Control;
34
35/*
36 *  _Objects_MP_Handler_initialization
37 *
38 *  DESCRIPTION:
39 *
40 *  This routine intializes the inactive global object chain
41 *  based on the maximum number of global objects configured.
42 */
43
44void _Objects_MP_Handler_initialization (
45  unsigned32 node,
46  unsigned32 maximum_nodes,
47  unsigned32 maximum_global_objects
48);
49
50/*
51 *  _Objects_MP_Allocate_global_object
52 *
53 *  DESCRIPTION:
54 *
55 *  This function allocates a Global Object control block.
56 */
57
58STATIC INLINE Objects_MP_Control *_Objects_MP_Allocate_global_object (
59  void
60);
61
62/*
63 *  _Objects_MP_Free_global_object
64 *
65 *  DESCRIPTION:
66 *
67 *  This routine deallocates a Global Object control block.
68 */
69
70STATIC INLINE void _Objects_MP_Free_global_object (
71  Objects_MP_Control *the_object
72);
73
74/*
75 *  _Objects_MP_Is_null_global_object
76 *
77 *  DESCRIPTION:
78 *
79 *  This function returns whether the global object is NULL or not.
80 */
81
82STATIC INLINE boolean _Objects_MP_Is_null_global_object (
83  Objects_MP_Control *the_object
84);
85
86/*PAGE
87 *
88 *  _Objects_MP_Open
89 *
90 *  DESCRIPTION:
91 *
92 *  This routine place the specified global object in the
93 *  specified information table. 
94 */
95 
96void _Objects_MP_Open (
97  Objects_Information *information,
98  Objects_MP_Control  *the_global_object,
99  unsigned32           the_name,      /* XXX -- wrong for variable */
100  Objects_Id           the_id
101);
102
103/*
104 *  _Objects_MP_Allocate_and_open
105 *
106 *  DESCRIPTION:
107 *
108 *  This routine allocates a global object control block
109 *  and places it in the specified information table.  If the
110 *  allocation fails, then is_fatal_error determines the
111 *  error processing actions taken.
112 */
113
114boolean _Objects_MP_Allocate_and_open (
115  Objects_Information *information,
116  unsigned32           the_name,     /* XXX -- wrong for variable length */
117  Objects_Id           the_id,
118  boolean              is_fatal_error
119);
120
121/*
122 *  _Objects_MP_Close
123 *
124 *  DESCRIPTION:
125 *
126 *  This routine removes a global object from the specified
127 *  information table and deallocates the global object control block.
128 */
129
130void _Objects_MP_Close (
131  Objects_Information *information,
132  Objects_Id           the_id
133);
134
135/*
136 *  _Objects_MP_Global_name_search
137 *
138 *  DESCRIPTION:
139 *
140 *  This routine looks for the object with the_name in the global
141 *  object tables indicated by information.  It returns the ID of the
142 *  object with that name if one is found.
143 */
144
145Objects_Name_to_id_errors _Objects_MP_Global_name_search (
146  Objects_Information *information,
147  Objects_Name         the_name,
148  unsigned32           nodes_to_search,
149  Objects_Id          *the_id
150);
151
152/*
153 *  _Objects_MP_Is_remote
154 *
155 *  DESCRIPTION:
156 *
157 *  This function searches the Global Object Table managed
158 *  by information for the object indicated by ID.  If the object
159 *  is found, then location is set to objects_remote, otherwise
160 *  location is set to objects_error.  In both cases, the_object
161 *  is undefined.
162 */
163
164void _Objects_MP_Is_remote (
165  Objects_Information  *information,
166  Objects_Id            the_id,
167  Objects_Locations    *location,
168  Objects_Control     **the_object
169);
170
171/*
172 *  The following chain header is used to manage the set of
173 *  inactive global object control blocks.
174 */
175
176EXTERN unsigned32     _Objects_MP_Maximum_global_objects;
177EXTERN Chain_Control  _Objects_MP_Inactive_global_objects;
178
179#include <rtems/core/objectmp.inl>
180
181#ifdef __cplusplus
182}
183#endif
184
185#endif
186/* end of include file */
Note: See TracBrowser for help on using the repository browser.