source: rtems/cpukit/sapi/include/rtems/extension.h @ b96254f

4.104.114.84.95
Last change on this file since b96254f was b96254f, checked in by Ralf Corsepius <ralf.corsepius@…>, on Nov 21, 2004 at 7:42:11 AM

Add doxygen preamble.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/**
2 * @file rtems/extension.h
3 */
4 
5/*
6 *  This include file contains all the constants, structures, and
7 *  prototypes associated with the User Extension Manager.  This manager
8 *  provides a mechanism for manipulating sets of user-defined extensions.
9 *
10 *  Directives provided are:
11 *
12 *     + create user extension set
13 *     + get ID of user extension set
14 *     + delete user extension set
15 *
16 *  COPYRIGHT (c) 1989-1999.
17 *  On-Line Applications Research Corporation (OAR).
18 *
19 *  The license and distribution terms for this file may be
20 *  found in the file LICENSE in this distribution or at
21 *  http://www.rtems.com/license/LICENSE.
22 *
23 *  $Id$
24 */
25
26#ifndef __RTEMS_EXTENSION_MANAGER_h
27#define __RTEMS_EXTENSION_MANAGER_h
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include <rtems/score/object.h>
34#include <rtems/score/userext.h>
35#include <rtems/rtems/status.h>  /* XXX */
36#include <rtems/rtems/types.h>  /* XXX */
37
38/*
39 *  Extension related types
40 */
41
42typedef User_extensions_routine                   rtems_extension;
43typedef User_extensions_thread_create_extension   rtems_task_create_extension;
44typedef User_extensions_thread_delete_extension   rtems_task_delete_extension;
45typedef User_extensions_thread_start_extension    rtems_task_start_extension;
46typedef User_extensions_thread_restart_extension  rtems_task_restart_extension;
47typedef User_extensions_thread_switch_extension   rtems_task_switch_extension;
48typedef User_extensions_thread_post_switch_extension
49                                              rtems_task_post_switch_extension;
50typedef User_extensions_thread_begin_extension    rtems_task_begin_extension;
51typedef User_extensions_thread_exitted_extension  rtems_task_exitted_extension;
52typedef User_extensions_fatal_extension           rtems_fatal_extension;
53
54typedef User_extensions_Table                     rtems_extensions_table;
55
56/*
57 *  The following defines the information control block used to manage
58 *  this class of objects.
59 */
60
61SAPI_EXTERN Objects_Information  _Extension_Information;
62
63/*
64 *  The following records define the control block used to manage
65 *  each extension.
66 */
67
68typedef struct {
69  Objects_Control          Object;
70  User_extensions_Control  Extension;
71}   Extension_Control;
72
73/*
74 *  _Extension_Manager_initialization
75 *
76 *  DESCRIPTION:
77 *
78 *  This routine performs the initialization necessary for this manager.
79 */
80
81void _Extension_Manager_initialization(
82  uint32_t   maximum_extensions
83);
84
85/*
86 *  rtems_extension_create
87 *
88 *  DESCRIPTION:
89 *
90 *  This routine implements the rtems_extension_create directive.  The
91 *  extension will have the name name.   The entry points of the
92 *  routines which constitute this extension set are in EXTENSION_TABLE.
93 *  It returns the id of the created extension in ID.
94 */
95
96rtems_status_code rtems_extension_create(
97  rtems_name              name,
98  rtems_extensions_table *extension_table,
99  Objects_Id              *id
100);
101
102/*
103 *  rtems_extension_ident
104 *
105 *  DESCRIPTION:
106 *
107 *  This routine implements the rtems_extension_ident directive.
108 *  This directive returns the extension ID associated with name.
109 *  If more than one extension is named name, then the extension
110 *  to which the ID belongs is arbitrary.
111 */
112
113rtems_status_code rtems_extension_ident(
114  rtems_name    name,
115  Objects_Id   *id
116);
117
118/*
119 *  rtems_extension_delete
120 *
121 *  DESCRIPTION:
122 *
123 *  This routine implements the rtems_extension_delete directive.  The
124 *  extension indicated by ID is deleted.
125 */
126
127rtems_status_code rtems_extension_delete(
128  Objects_Id id
129);
130
131#ifndef __RTEMS_APPLICATION__
132#include <rtems/extension.inl>
133#endif
134
135#ifdef __cplusplus
136}
137#endif
138
139#endif
140/* end of include file */
Note: See TracBrowser for help on using the repository browser.