source: rtems/cpukit/sapi/include/rtems/extension.h @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 11, 1995 at 7:35:39 PM

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 4.7 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/core/object.h>
32#include <rtems/core/userext.h>
33#include <rtems/rtems/status.h>  /* XXX */
34#include <rtems/rtems/types.h>  /* XXX */
35
36/*
37 *  Extension related types
38 */
39
40typedef User_extensions_routine                   rtems_extension;
41typedef User_extensions_thread_create_extension   rtems_task_create_extension;
42typedef User_extensions_thread_delete_extension   rtems_task_delete_extension;
43typedef User_extensions_thread_start_extension    rtems_task_start_extension;
44typedef User_extensions_thread_restart_extension  rtems_task_restart_extension;
45typedef User_extensions_thread_switch_extension   rtems_task_switch_extension;
46typedef User_extensions_thread_post_switch_extension 
47  rtems_task_post_switch_extension;
48typedef User_extensions_thread_begin_extension    rtems_task_begin_extension;
49typedef User_extensions_thread_exitted_extension  rtems_task_exitted_extension;
50typedef User_extensions_fatal_extension           rtems_fatal_extension;
51
52typedef User_extensions_Table                     rtems_extensions_table;
53
54/*
55 *  The following defines the information control block used to manage
56 *  this class of objects.
57 */
58
59EXTERN Objects_Information  _Extension_Information;
60
61/*
62 *  The following records define the control block used to manage
63 *  each extension.
64 */
65
66typedef struct {
67  Objects_Control          Object;
68  User_extensions_Control  Extension;
69}   Extension_Control;
70
71/*
72 *  _Extension_Manager_initialization
73 *
74 *  DESCRIPTION:
75 *
76 *  This routine performs the initialization necessary for this manager.
77 */
78
79void _Extension_Manager_initialization(
80  unsigned32 maximum_extensions
81);
82
83/*
84 *  rtems_extension_create
85 *
86 *  DESCRIPTION:
87 *
88 *  This routine implements the rtems_extension_create directive.  The
89 *  extension will have the name name.   The entry points of the
90 *  routines which constitute this extension set are in EXTENSION_TABLE.
91 *  It returns the id of the created extension in ID.
92 */
93
94rtems_status_code rtems_extension_create(
95  rtems_name              name,
96  rtems_extensions_table *extension_table,
97  Objects_Id              *id
98);
99
100/*
101 *  rtems_extension_ident
102 *
103 *  DESCRIPTION:
104 *
105 *  This routine implements the rtems_extension_ident directive.
106 *  This directive returns the extension ID associated with name.
107 *  If more than one extension is named name, then the extension
108 *  to which the ID belongs is arbitrary.
109 */
110
111rtems_status_code rtems_extension_ident(
112  rtems_name    name,
113  Objects_Id   *id
114);
115
116/*
117 *  rtems_extension_delete
118 *
119 *  DESCRIPTION:
120 *
121 *  This routine implements the rtems_extension_delete directive.  The
122 *  extension indicated by ID is deleted.
123 */
124
125rtems_status_code rtems_extension_delete(
126  Objects_Id id
127);
128
129/*
130 *  _Extension_Allocate
131 *
132 *  DESCRIPTION:
133 *
134 *  This function allocates a extension control block from
135 *  the inactive chain of free extension control blocks.
136 */
137
138STATIC INLINE Extension_Control *_Extension_Allocate( void );
139
140/*
141 *  _Extension_Free
142 *
143 *  DESCRIPTION:
144 *
145 *  This routine frees a extension control block to the
146 *  inactive chain of free extension control blocks.
147 */
148
149STATIC INLINE void _Extension_Free (
150  Extension_Control *the_extension
151);
152
153/*
154 *  _Extension_Get
155 *
156 *  DESCRIPTION:
157 *
158 *  This function maps extension IDs to extension control blocks.
159 *  If ID corresponds to a local extension, then it returns
160 *  the extension control pointer which maps to ID and location
161 *  is set to OBJECTS_LOCAL.  Otherwise, location is set
162 *  to OBJECTS_ERROR and the returned value is undefined.
163 */
164
165STATIC INLINE Extension_Control *_Extension_Get (
166  Objects_Id         id,
167  Objects_Locations *location
168);
169
170/*
171 *  _Extension_Is_null
172 *
173 *  DESCRIPTION:
174 *
175 *  This function returns TRUE if the_extension is NULL and FALSE otherwise.
176 */
177
178STATIC INLINE boolean _Extension_Is_null(
179  Extension_Control *the_extension
180);
181
182#include <rtems/extension.inl>
183
184#ifdef __cplusplus
185}
186#endif
187
188#endif
189/* end of include file */
Note: See TracBrowser for help on using the repository browser.