OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [exec/] [sapi/] [include/] [rtems/] [extension.h] - Blame information for rev 1779

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 158 chris
/*  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-1999.
14
 *  On-Line Applications Research Corporation (OAR).
15
 *
16
 *  The license and distribution terms for this file may be
17
 *  found in the file LICENSE in this distribution or at
18
 *  http://www.OARcorp.com/rtems/license.html.
19
 *
20 208 chris
 *  $Id: extension.h,v 1.2 2001-09-27 11:59:19 chris Exp $
21 158 chris
 */
22
 
23
#ifndef __RTEMS_EXTENSION_MANAGER_h
24
#define __RTEMS_EXTENSION_MANAGER_h
25
 
26
#ifdef __cplusplus
27
extern "C" {
28
#endif
29
 
30
#include <rtems/score/object.h>
31
#include <rtems/score/userext.h>
32
#include <rtems/rtems/status.h>  /* XXX */
33
#include <rtems/rtems/types.h>  /* XXX */
34
 
35
/*
36
 *  Extension related types
37
 */
38
 
39
typedef User_extensions_routine                   rtems_extension;
40
typedef User_extensions_thread_create_extension   rtems_task_create_extension;
41
typedef User_extensions_thread_delete_extension   rtems_task_delete_extension;
42
typedef User_extensions_thread_start_extension    rtems_task_start_extension;
43
typedef User_extensions_thread_restart_extension  rtems_task_restart_extension;
44
typedef User_extensions_thread_switch_extension   rtems_task_switch_extension;
45
typedef User_extensions_thread_post_switch_extension
46
                                              rtems_task_post_switch_extension;
47
typedef User_extensions_thread_begin_extension    rtems_task_begin_extension;
48
typedef User_extensions_thread_exitted_extension  rtems_task_exitted_extension;
49
typedef User_extensions_fatal_extension           rtems_fatal_extension;
50
 
51
typedef User_extensions_Table                     rtems_extensions_table;
52
 
53
/*
54
 *  The following defines the information control block used to manage
55
 *  this class of objects.
56
 */
57
 
58
SAPI_EXTERN Objects_Information  _Extension_Information;
59
 
60
/*
61
 *  The following records define the control block used to manage
62
 *  each extension.
63
 */
64
 
65
typedef struct {
66
  Objects_Control          Object;
67
  User_extensions_Control  Extension;
68
}   Extension_Control;
69
 
70
/*
71
 *  _Extension_Manager_initialization
72
 *
73
 *  DESCRIPTION:
74
 *
75
 *  This routine performs the initialization necessary for this manager.
76
 */
77
 
78
void _Extension_Manager_initialization(
79
  unsigned32 maximum_extensions
80
);
81
 
82
/*
83
 *  rtems_extension_create
84
 *
85
 *  DESCRIPTION:
86
 *
87
 *  This routine implements the rtems_extension_create directive.  The
88
 *  extension will have the name name.   The entry points of the
89
 *  routines which constitute this extension set are in EXTENSION_TABLE.
90
 *  It returns the id of the created extension in ID.
91
 */
92
 
93
rtems_status_code rtems_extension_create(
94
  rtems_name              name,
95
  rtems_extensions_table *extension_table,
96
  Objects_Id              *id
97
);
98
 
99
/*
100
 *  rtems_extension_ident
101
 *
102
 *  DESCRIPTION:
103
 *
104
 *  This routine implements the rtems_extension_ident directive.
105
 *  This directive returns the extension ID associated with name.
106
 *  If more than one extension is named name, then the extension
107
 *  to which the ID belongs is arbitrary.
108
 */
109
 
110
rtems_status_code rtems_extension_ident(
111
  rtems_name    name,
112
  Objects_Id   *id
113
);
114
 
115
/*
116
 *  rtems_extension_delete
117
 *
118
 *  DESCRIPTION:
119
 *
120
 *  This routine implements the rtems_extension_delete directive.  The
121
 *  extension indicated by ID is deleted.
122
 */
123
 
124
rtems_status_code rtems_extension_delete(
125
  Objects_Id id
126
);
127
 
128
#ifndef __RTEMS_APPLICATION__
129
#include <rtems/extension.inl>
130
#endif
131
 
132
#ifdef __cplusplus
133
}
134
#endif
135
 
136
#endif
137
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.