source: rtems/c/src/exec/sapi/headers/extension.h @ 2a02b0a

4.104.114.84.95
Last change on this file since 2a02b0a was 2a02b0a, checked in by Joel Sherrill <joel.sherrill@…>, on 07/09/97 at 23:50:45

Added postswitch extension.

  • Property mode set to 100644
File size: 3.6 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-1997.
14 *  On-Line Applications Research Corporation (OAR).
15 *  Copyright assigned to U.S. Government, 1994.
16 *
17 *  The license and distribution terms for this file may in
18 *  the file LICENSE in this distribution or at
19 *  http://www.OARcorp.com/rtems/license.html.
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/score/object.h>
32#include <rtems/score/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
59SAPI_EXTERN 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#ifndef __RTEMS_APPLICATION__
130#include <rtems/extension.inl>
131#endif
132
133#ifdef __cplusplus
134}
135#endif
136
137#endif
138/* end of include file */
Note: See TracBrowser for help on using the repository browser.