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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [include/] [rtems/] [score/] [userext.h] - Blame information for rev 593

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

Line No. Rev Author Line
1 30 unneback
/*  userext.h
2
 *
3
 *  This include file contains all information about user extensions.  This
4
 *  Handler provides mechanisms which can be used to initialize and manipulate
5
 *  all user extensions.
6
 *
7
 *  COPYRIGHT (c) 1989-1999.
8
 *  On-Line Applications Research Corporation (OAR).
9
 *
10
 *  The license and distribution terms for this file may be
11
 *  found in the file LICENSE in this distribution or at
12
 *  http://www.OARcorp.com/rtems/license.html.
13
 *
14
 *  $Id: userext.h,v 1.2 2001-09-27 11:59:32 chris Exp $
15
 */
16
 
17
#ifndef __USER_EXTENSIONS_h
18
#define __USER_EXTENSIONS_h
19
 
20
#ifdef __cplusplus
21
extern "C" {
22
#endif
23
 
24
#include <rtems/score/interr.h>
25
#include <rtems/score/chain.h>
26
#include <rtems/score/thread.h>
27
 
28
/*
29
 *  The following records defines the User Extension Table.
30
 *  This table defines the application dependent routines which
31
 *  are invoked at critical points in the life of each thread and
32
 *  the system as a whole.
33
 */
34
 
35
typedef void User_extensions_routine;
36
 
37
typedef boolean ( *User_extensions_thread_create_extension )(
38
                 Thread_Control *,
39
                 Thread_Control *
40
             );
41
 
42
typedef User_extensions_routine ( *User_extensions_thread_delete_extension )(
43
                 Thread_Control *,
44
                 Thread_Control *
45
             );
46
 
47
typedef User_extensions_routine ( *User_extensions_thread_start_extension )(
48
                 Thread_Control *,
49
                 Thread_Control *
50
             );
51
 
52
typedef User_extensions_routine ( *User_extensions_thread_restart_extension )(
53
                 Thread_Control *,
54
                 Thread_Control *
55
             );
56
 
57
typedef User_extensions_routine ( *User_extensions_thread_switch_extension )(
58
                 Thread_Control *,
59
                 Thread_Control *
60
             );
61
 
62
typedef User_extensions_routine (
63
                                *User_extensions_thread_post_switch_extension )(
64
                 Thread_Control *
65
             );
66
 
67
typedef User_extensions_routine ( *User_extensions_thread_begin_extension )(
68
                 Thread_Control *
69
             );
70
 
71
typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )(
72
                 Thread_Control *
73
             );
74
 
75
typedef User_extensions_routine ( *User_extensions_fatal_extension )(
76
                 Internal_errors_Source  /* the_source  */,
77
                 boolean                 /* is_internal */,
78
                 unsigned32              /* the_error   */
79
             );
80
 
81
 
82
typedef struct {
83
  User_extensions_thread_create_extension       thread_create;
84
  User_extensions_thread_start_extension        thread_start;
85
  User_extensions_thread_restart_extension      thread_restart;
86
  User_extensions_thread_delete_extension       thread_delete;
87
  User_extensions_thread_switch_extension       thread_switch;
88
  User_extensions_thread_begin_extension        thread_begin;
89
  User_extensions_thread_exitted_extension      thread_exitted;
90
  User_extensions_fatal_extension               fatal;
91
}   User_extensions_Table;
92
 
93
/*
94
 *  The following is used to manage each user extension set.
95
 */
96
 
97
typedef struct {
98
  Chain_Node              Node;
99
  User_extensions_Table   Callouts;
100
}   User_extensions_Control;
101
 
102
/*
103
 *  The following is used to manage the list of active extensions.
104
 */
105
 
106
SCORE_EXTERN Chain_Control _User_extensions_List;
107
 
108
/*
109
 *  _User_extensions_Thread_create
110
 *
111
 *  DESCRIPTION:
112
 *
113
 *  This routine is used to invoke the user extension for
114
 *  the thread creation operate.
115
 */
116
 
117
boolean _User_extensions_Thread_create (
118
  Thread_Control *the_thread
119
);
120
 
121
/*
122
 *  _User_extensions_Thread_delete
123
 *
124
 *  DESCRIPTION:
125
 *
126
 *  This routine is used to invoke the user extension for
127
 *  the thread deletion operation.
128
 */
129
 
130
void _User_extensions_Thread_delete (
131
  Thread_Control *the_thread
132
);
133
 
134
/*
135
 *  _User_extensions_Thread_start
136
 *
137
 *  DESCRIPTION:
138
 *
139
 *  This routine is used to invoke the user extension for
140
 *  the thread start operation.
141
 */
142
 
143
void _User_extensions_Thread_start (
144
  Thread_Control *the_thread
145
);
146
 
147
/*
148
 *  _User_extensions_Thread_restart
149
 *
150
 *  DESCRIPTION:
151
 *
152
 *  This routine is used to invoke the user extension for
153
 *  the thread restart operation.
154
 */
155
 
156
void _User_extensions_Thread_restart (
157
  Thread_Control *the_thread
158
);
159
 
160
/*
161
 *  _User_extensions_Thread_begin
162
 *
163
 *  DESCRIPTION:
164
 *
165
 *  This routine is used to invoke the user extension which
166
 *  is invoked when a thread begins.
167
 */
168
 
169
void _User_extensions_Thread_begin (
170
  Thread_Control *executing
171
);
172
 
173
/*
174
 *  _User_extensions_Thread_exitted
175
 *
176
 *  DESCRIPTION:
177
 *
178
 *  This routine is used to invoke the user extension which
179
 *  is invoked when a thread exits.
180
 */
181
 
182
void _User_extensions_Thread_exitted (
183
  Thread_Control *executing
184
);
185
 
186
/*
187
 *  _User_extensions_Fatal
188
 *
189
 *  DESCRIPTION:
190
 *
191
 *  This routine is used to invoke the user extension invoked
192
 *  when a fatal error occurs.
193
 */
194
 
195
void _User_extensions_Fatal (
196
  Internal_errors_Source  the_source,
197
  boolean                 is_internal,
198
  unsigned32              the_error
199
);
200
 
201
#ifndef __RTEMS_APPLICATION__
202
#include <rtems/score/userext.inl>
203
#endif
204
 
205
#ifdef __cplusplus
206
}
207
#endif
208
 
209
#endif
210
/* end of include file */

powered by: WebSVN 2.1.0

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