source: rtems/c/src/exec/sapi/headers/extension.h @ 3235ad9

4.104.114.84.95
Last change on this file since 3235ad9 was 3235ad9, checked in by Joel Sherrill <joel.sherrill@…>, on 08/23/95 at 19:30:23

Support for variable length names added to Object Handler. This supports
both fixed length "raw" names and strings from the API's point of view.

Both inline and macro implementations were tested.

  • Property mode set to 100644
File size: 3.8 KB
Line 
1/*  extension.h
2 *
3 *  This include file contains all the constants, structures, and
4 *  prototypes associated with the User Extension Manager.  This manager
5 *  provides a mechanism for manipulating sets of user-defined extensions.
6 *
7 *  Directives provided are:
8 *
9 *     + create user extension set
10 *     + get ID of user extension set
11 *     + delete user extension set
12 *
13 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
14 *  On-Line Applications Research Corporation (OAR).
15 *  All rights assigned to U.S. Government, 1994.
16 *
17 *  This material may be reproduced by or for the U.S. Government pursuant
18 *  to the copyright license under the clause at DFARS 252.227-7013.  This
19 *  notice must appear in all copies of this file and its derivatives.
20 *
21 *  $Id$
22 */
23
24#ifndef __RTEMS_EXTENSION_MANAGER_h
25#define __RTEMS_EXTENSION_MANAGER_h
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#include <rtems.h>
32#include <rtems/object.h>
33#include <rtems/userext.h>
34
35/*
36 *  The following defines the information control block used to manage
37 *  this class of objects.
38 */
39
40EXTERN Objects_Information  _Extension_Information;
41
42/*
43 *  The following records define the control block used to manage
44 *  each extension.
45 */
46
47typedef struct {
48  Objects_Control          Object;
49  User_extensions_Control  Extension;
50}   Extension_Control;
51
52/*
53 *  _Extension_Manager_initialization
54 *
55 *  DESCRIPTION:
56 *
57 *  This routine performs the initialization necessary for this manager.
58 */
59
60void _Extension_Manager_initialization(
61  unsigned32 maximum_extensions
62);
63
64/*
65 *  rtems_extension_create
66 *
67 *  DESCRIPTION:
68 *
69 *  This routine implements the rtems_extension_create directive.  The
70 *  extension will have the name name.   The entry points of the
71 *  routines which constitute this extension set are in EXTENSION_TABLE.
72 *  It returns the id of the created extension in ID.
73 */
74
75rtems_status_code rtems_extension_create(
76  rtems_name                     name,
77  rtems_extensions_table *extension_table,
78  Objects_Id                    *id
79);
80
81/*
82 *  rtems_extension_ident
83 *
84 *  DESCRIPTION:
85 *
86 *  This routine implements the rtems_extension_ident directive.
87 *  This directive returns the extension ID associated with name.
88 *  If more than one extension is named name, then the extension
89 *  to which the ID belongs is arbitrary.
90 */
91
92rtems_status_code rtems_extension_ident(
93  rtems_name    name,
94  Objects_Id   *id
95);
96
97/*
98 *  rtems_extension_delete
99 *
100 *  DESCRIPTION:
101 *
102 *  This routine implements the rtems_extension_delete directive.  The
103 *  extension indicated by ID is deleted.
104 */
105
106rtems_status_code rtems_extension_delete(
107  Objects_Id id
108);
109
110/*
111 *  _Extension_Allocate
112 *
113 *  DESCRIPTION:
114 *
115 *  This function allocates a extension control block from
116 *  the inactive chain of free extension control blocks.
117 */
118
119STATIC INLINE Extension_Control *_Extension_Allocate( void );
120
121/*
122 *  _Extension_Free
123 *
124 *  DESCRIPTION:
125 *
126 *  This routine frees a extension control block to the
127 *  inactive chain of free extension control blocks.
128 */
129
130STATIC INLINE void _Extension_Free (
131  Extension_Control *the_extension
132);
133
134/*
135 *  _Extension_Get
136 *
137 *  DESCRIPTION:
138 *
139 *  This function maps extension IDs to extension control blocks.
140 *  If ID corresponds to a local extension, then it returns
141 *  the extension control pointer which maps to ID and location
142 *  is set to OBJECTS_LOCAL.  Otherwise, location is set
143 *  to OBJECTS_ERROR and the returned value is undefined.
144 */
145
146STATIC INLINE Extension_Control *_Extension_Get (
147  Objects_Id         id,
148  Objects_Locations *location
149);
150
151/*
152 *  _Extension_Is_null
153 *
154 *  DESCRIPTION:
155 *
156 *  This function returns TRUE if the_extension is NULL and FALSE otherwise.
157 */
158
159STATIC INLINE boolean _Extension_Is_null(
160  Extension_Control *the_extension
161);
162
163#include <rtems/extension.inl>
164
165#ifdef __cplusplus
166}
167#endif
168
169#endif
170/* end of include file */
Note: See TracBrowser for help on using the repository browser.