source: rtems/c/src/exec/score/include/rtems/score/userext.h @ 1a8fde6c

4.104.114.84.95
Last change on this file since 1a8fde6c was 1a8fde6c, checked in by Joel Sherrill <joel.sherrill@…>, on 03/06/96 at 21:34:57

Removed prototyes for static inline routines and moved the comments into
the inline implementation. The impetus for this was twofold. First,
it is incorrect to have static inline prototypes when using the macro
implementation. Second, this reduced the number of lines in the include
files seen by rtems.h by about 2000 lines.

Next we restricted visibility for the inline routines to inside the
executive itself EXCEPT for a handful of objects. This reduced the
number of include files included by rtems.h by 40 files and reduced
the lines in the include files seen by rtems.h by about 6000 lines.

In total, these reduced the compile time of the entire RTEMS tree by 20%.
This results in about 8 minutes savings on the SparcStation? 10 morgana.

  • Property mode set to 100644
File size: 5.1 KB
Line 
1/*  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, 1990, 1991, 1992, 1993, 1994.
8 *  On-Line Applications Research Corporation (OAR).
9 *  All rights assigned to U.S. Government, 1994.
10 *
11 *  This material may be reproduced by or for the U.S. Government pursuant
12 *  to the copyright license under the clause at DFARS 252.227-7013.  This
13 *  notice must appear in all copies of this file and its derivatives.
14 *
15 *  $Id$
16 */
17
18#ifndef __USER_EXTENSIONS_h
19#define __USER_EXTENSIONS_h
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include <rtems/score/interr.h>
26#include <rtems/score/chain.h>
27#include <rtems/score/thread.h>
28
29/*
30 *  The following records defines the User Extension Table.
31 *  This table defines the application dependent routines which
32 *  are invoked at critical points in the life of each thread and
33 *  the system as a whole.
34 */
35 
36typedef void User_extensions_routine;
37 
38typedef boolean ( *User_extensions_thread_create_extension )(
39                 Thread_Control *,
40                 Thread_Control *
41             );
42 
43typedef User_extensions_routine ( *User_extensions_thread_delete_extension )(
44                 Thread_Control *,
45                 Thread_Control *
46             );
47 
48typedef User_extensions_routine ( *User_extensions_thread_start_extension )(
49                 Thread_Control *,
50                 Thread_Control *
51             );
52 
53typedef User_extensions_routine ( *User_extensions_thread_restart_extension )(
54                 Thread_Control *,
55                 Thread_Control *
56             );
57 
58typedef User_extensions_routine ( *User_extensions_thread_switch_extension )(
59                 Thread_Control *,
60                 Thread_Control *
61             );
62 
63typedef User_extensions_routine ( *User_extensions_thread_begin_extension )(
64                 Thread_Control *
65             );
66 
67typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )(
68                 Thread_Control *
69             );
70 
71typedef User_extensions_routine ( *User_extensions_fatal_extension )(
72                 Internal_errors_Source  /* the_source  */,
73                 boolean                 /* is_internal */,
74                 unsigned32              /* the_error   */
75             );
76
77 
78typedef struct {
79  User_extensions_thread_create_extension       thread_create;
80  User_extensions_thread_start_extension        thread_start;
81  User_extensions_thread_restart_extension      thread_restart;
82  User_extensions_thread_delete_extension       thread_delete;
83  User_extensions_thread_switch_extension       thread_switch;
84  User_extensions_thread_begin_extension        thread_begin;
85  User_extensions_thread_exitted_extension      thread_exitted;
86  User_extensions_fatal_extension               fatal;
87}   User_extensions_Table;
88
89/*
90 *  The following is used to manage each user extension set.
91 */
92
93typedef struct {
94  Chain_Node              Node;
95  User_extensions_Table   Callouts;
96}   User_extensions_Control;
97
98/*
99 *  The following contains the static extension set which may be
100 *  configured by the application.
101 */
102
103EXTERN User_extensions_Control _User_extensions_Initial;
104
105/*
106 *  The following is used to manage the list of active extensions.
107 */
108
109EXTERN Chain_Control _User_extensions_List;
110
111/*
112 *  _User_extensions_Thread_create
113 *
114 *  DESCRIPTION:
115 *
116 *  This routine is used to invoke the user extension for
117 *  the thread creation operate.
118 */
119
120boolean _User_extensions_Thread_create (
121  Thread_Control *the_thread
122);
123
124/*
125 *  _User_extensions_Thread_delete
126 *
127 *  DESCRIPTION:
128 *
129 *  This routine is used to invoke the user extension for
130 *  the thread deletion operation.
131 */
132
133void _User_extensions_Thread_delete (
134  Thread_Control *the_thread
135);
136
137/*
138 *  _User_extensions_Thread_start
139 *
140 *  DESCRIPTION:
141 *
142 *  This routine is used to invoke the user extension for
143 *  the thread start operation.
144 */
145
146void _User_extensions_Thread_start (
147  Thread_Control *the_thread
148);
149
150/*
151 *  _User_extensions_Thread_restart
152 *
153 *  DESCRIPTION:
154 *
155 *  This routine is used to invoke the user extension for
156 *  the thread restart operation.
157 */
158
159void _User_extensions_Thread_restart (
160  Thread_Control *the_thread
161);
162
163/*
164 *  _User_extensions_Thread_begin
165 *
166 *  DESCRIPTION:
167 *
168 *  This routine is used to invoke the user extension which
169 *  is invoked when a thread begins.
170 */
171
172void _User_extensions_Thread_begin (
173  Thread_Control *executing
174);
175
176/*
177 *  _User_extensions_Thread_exitted
178 *
179 *  DESCRIPTION:
180 *
181 *  This routine is used to invoke the user extension which
182 *  is invoked when a thread exits.
183 */
184
185void _User_extensions_Thread_exitted (
186  Thread_Control *executing
187);
188
189/*
190 *  _User_extensions_Fatal
191 *
192 *  DESCRIPTION:
193 *
194 *  This routine is used to invoke the user extension invoked
195 *  when a fatal error occurs.
196 */
197
198void _User_extensions_Fatal (
199  Internal_errors_Source  the_source,
200  boolean                 is_internal,
201  unsigned32              the_error
202);
203
204#ifndef __RTEMS_APPLICATION__
205#include <rtems/score/userext.inl>
206#endif
207
208#ifdef __cplusplus
209}
210#endif
211
212#endif
213/* end of include file */
Note: See TracBrowser for help on using the repository browser.