source: rtems/cpukit/score/include/rtems/score/userext.h @ dd687d97

4.104.114.84.95
Last change on this file since dd687d97 was dd687d97, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:56:05

2003-09-04 Joel Sherrill <joel@…>

  • include/rtems/debug.h, include/rtems/seterr.h, include/rtems/system.h, include/rtems/score/address.h, include/rtems/score/apiext.h, include/rtems/score/apimutex.h, include/rtems/score/bitfield.h, include/rtems/score/chain.h, include/rtems/score/context.h, include/rtems/score/copyrt.h, include/rtems/score/coremsg.h, include/rtems/score/coremutex.h, include/rtems/score/coresem.h, include/rtems/score/heap.h, include/rtems/score/interr.h, include/rtems/score/isr.h, include/rtems/score/mpci.h, include/rtems/score/mppkt.h, include/rtems/score/object.h, include/rtems/score/objectmp.h, include/rtems/score/priority.h, include/rtems/score/stack.h, include/rtems/score/states.h, include/rtems/score/sysstate.h, include/rtems/score/thread.h, include/rtems/score/threadmp.h, include/rtems/score/threadq.h, include/rtems/score/tod.h, include/rtems/score/tqdata.h, include/rtems/score/userext.h, include/rtems/score/watchdog.h, include/rtems/score/wkspace.h, inline/rtems/score/address.inl, inline/rtems/score/chain.inl, inline/rtems/score/coremsg.inl, inline/rtems/score/coremutex.inl, inline/rtems/score/coresem.inl, inline/rtems/score/heap.inl, inline/rtems/score/isr.inl, inline/rtems/score/mppkt.inl, inline/rtems/score/object.inl, inline/rtems/score/objectmp.inl, inline/rtems/score/priority.inl, inline/rtems/score/stack.inl, inline/rtems/score/states.inl, inline/rtems/score/sysstate.inl, inline/rtems/score/thread.inl, inline/rtems/score/threadmp.inl, inline/rtems/score/tod.inl, inline/rtems/score/tqdata.inl, inline/rtems/score/userext.inl, inline/rtems/score/watchdog.inl, inline/rtems/score/wkspace.inl, macros/rtems/score/address.inl, macros/rtems/score/chain.inl, macros/rtems/score/coremsg.inl, macros/rtems/score/coremutex.inl, macros/rtems/score/coresem.inl, macros/rtems/score/heap.inl, macros/rtems/score/isr.inl, macros/rtems/score/mppkt.inl, macros/rtems/score/object.inl, macros/rtems/score/objectmp.inl, macros/rtems/score/priority.inl, macros/rtems/score/stack.inl, macros/rtems/score/states.inl, macros/rtems/score/sysstate.inl, macros/rtems/score/thread.inl, macros/rtems/score/threadmp.inl, macros/rtems/score/tod.inl, macros/rtems/score/tqdata.inl, macros/rtems/score/userext.inl, macros/rtems/score/watchdog.inl, macros/rtems/score/wkspace.inl, src/apiext.c, src/chain.c, src/coremsg.c, src/coremsgbroadcast.c, src/coremsgclose.c, src/coremsgflush.c, src/coremsgflushsupp.c, src/coremsgflushwait.c, src/coremsginsert.c, src/coremsgseize.c, src/coremsgsubmit.c, src/coremutex.c, src/coremutexflush.c, src/coremutexseize.c, src/coremutexsurrender.c, src/coresem.c, src/coresemflush.c, src/coresemseize.c, src/coresemsurrender.c, src/coretod.c, src/coretodset.c, src/coretodtickle.c, src/coretodtoseconds.c, src/coretodvalidate.c, src/heap.c, src/heapallocate.c, src/heapextend.c, src/heapfree.c, src/heapgetinfo.c, src/heapsizeofuserarea.c, src/heapwalk.c, src/interr.c, src/isr.c, src/iterateoverthreads.c, src/mpci.c, src/object.c, src/objectallocate.c, src/objectallocatebyindex.c, src/objectclearname.c, src/objectcomparenameraw.c, src/objectcomparenamestring.c, src/objectcopynameraw.c, src/objectcopynamestring.c, src/objectextendinformation.c, src/objectfree.c, src/objectget.c, src/objectgetbyindex.c, src/objectgetisr.c, src/objectgetnext.c, src/objectgetnoprotection.c, src/objectidtoname.c, src/objectinitializeinformation.c, src/objectmp.c, src/objectnametoid.c, src/objectshrinkinformation.c, src/thread.c, src/threadchangepriority.c, src/threadclearstate.c, src/threadclose.c, src/threadcreateidle.c, src/threaddelayended.c, src/threaddispatch.c, src/threadevaluatemode.c, src/threadget.c, src/threadhandler.c, src/threadidlebody.c, src/threadinitialize.c, src/threadloadenv.c, src/threadmp.c, src/threadq.c, src/threadqdequeue.c, src/threadqdequeuefifo.c, src/threadqdequeuepriority.c, src/threadqenqueue.c, src/threadqenqueuefifo.c, src/threadqenqueuepriority.c, src/threadqextract.c, src/threadqextractfifo.c, src/threadqextractpriority.c, src/threadqextractwithproxy.c, src/threadqfirst.c, src/threadqfirstfifo.c, src/threadqfirstpriority.c, src/threadqflush.c, src/threadqtimeout.c, src/threadready.c, src/threadreset.c, src/threadresettimeslice.c, src/threadrestart.c, src/threadresume.c, src/threadrotatequeue.c, src/threadsetpriority.c, src/threadsetstate.c, src/threadsettransient.c, src/threadstackallocate.c, src/threadstackfree.c, src/threadstart.c, src/threadstartmultitasking.c, src/threadsuspend.c, src/threadtickletimeslice.c, src/threadyieldprocessor.c, src/userext.c, src/watchdog.c, src/watchdogadjust.c, src/watchdoginsert.c, src/watchdogremove.c, src/watchdogtickle.c, src/wkspace.c: URL for license changed.
  • Property mode set to 100644
File size: 5.5 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-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.rtems.com/license/LICENSE.
13 *
14 *  $Id$
15 */
16
17#ifndef __USER_EXTENSIONS_h
18#define __USER_EXTENSIONS_h
19
20#ifdef __cplusplus
21extern "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 
35typedef void User_extensions_routine;
36 
37typedef boolean ( *User_extensions_thread_create_extension )(
38                 Thread_Control *,
39                 Thread_Control *
40             );
41 
42typedef User_extensions_routine ( *User_extensions_thread_delete_extension )(
43                 Thread_Control *,
44                 Thread_Control *
45             );
46 
47typedef User_extensions_routine ( *User_extensions_thread_start_extension )(
48                 Thread_Control *,
49                 Thread_Control *
50             );
51 
52typedef User_extensions_routine ( *User_extensions_thread_restart_extension )(
53                 Thread_Control *,
54                 Thread_Control *
55             );
56 
57typedef User_extensions_routine ( *User_extensions_thread_switch_extension )(
58                 Thread_Control *,
59                 Thread_Control *
60             );
61 
62typedef User_extensions_routine (
63                                *User_extensions_thread_post_switch_extension )(
64                 Thread_Control *
65             );
66 
67typedef User_extensions_routine ( *User_extensions_thread_begin_extension )(
68                 Thread_Control *
69             );
70 
71typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )(
72                 Thread_Control *
73             );
74 
75typedef User_extensions_routine ( *User_extensions_fatal_extension )(
76                 Internal_errors_Source  /* the_source  */,
77                 boolean                 /* is_internal */,
78                 unsigned32              /* the_error   */
79             );
80
81 
82typedef 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 the list of switch handlers.
95 */
96
97typedef struct {
98  Chain_Node                              Node;
99  User_extensions_thread_switch_extension thread_switch;
100}   User_extensions_Switch_control;
101
102/*
103 *  The following is used to manage each user extension set.
104 *  The switch control is part of the extensions control even
105 *  if not used due to the extension not having a switch
106 *  handler.
107 */
108
109typedef struct {
110  Chain_Node                     Node;
111  User_extensions_Switch_control Switch;
112  User_extensions_Table          Callouts;
113}   User_extensions_Control;
114
115/*
116 *  The following is used to manage the list of active extensions.
117 */
118
119SCORE_EXTERN Chain_Control _User_extensions_List;
120
121/*
122 *  The following is used to manage a chain of user extension task
123 *  switch nodes.
124 */
125
126SCORE_EXTERN Chain_Control _User_extensions_Switches_list;
127
128/*
129 *  _User_extensions_Thread_create
130 *
131 *  DESCRIPTION:
132 *
133 *  This routine is used to invoke the user extension for
134 *  the thread creation operate.
135 */
136
137boolean _User_extensions_Thread_create (
138  Thread_Control *the_thread
139);
140
141/*
142 *  _User_extensions_Thread_delete
143 *
144 *  DESCRIPTION:
145 *
146 *  This routine is used to invoke the user extension for
147 *  the thread deletion operation.
148 */
149
150void _User_extensions_Thread_delete (
151  Thread_Control *the_thread
152);
153
154/*
155 *  _User_extensions_Thread_start
156 *
157 *  DESCRIPTION:
158 *
159 *  This routine is used to invoke the user extension for
160 *  the thread start operation.
161 */
162
163void _User_extensions_Thread_start (
164  Thread_Control *the_thread
165);
166
167/*
168 *  _User_extensions_Thread_restart
169 *
170 *  DESCRIPTION:
171 *
172 *  This routine is used to invoke the user extension for
173 *  the thread restart operation.
174 */
175
176void _User_extensions_Thread_restart (
177  Thread_Control *the_thread
178);
179
180/*
181 *  _User_extensions_Thread_begin
182 *
183 *  DESCRIPTION:
184 *
185 *  This routine is used to invoke the user extension which
186 *  is invoked when a thread begins.
187 */
188
189void _User_extensions_Thread_begin (
190  Thread_Control *executing
191);
192
193/*
194 *  _User_extensions_Thread_exitted
195 *
196 *  DESCRIPTION:
197 *
198 *  This routine is used to invoke the user extension which
199 *  is invoked when a thread exits.
200 */
201
202void _User_extensions_Thread_exitted (
203  Thread_Control *executing
204);
205
206/*
207 *  _User_extensions_Fatal
208 *
209 *  DESCRIPTION:
210 *
211 *  This routine is used to invoke the user extension invoked
212 *  when a fatal error occurs.
213 */
214
215void _User_extensions_Fatal (
216  Internal_errors_Source  the_source,
217  boolean                 is_internal,
218  unsigned32              the_error
219);
220
221#ifndef __RTEMS_APPLICATION__
222#include <rtems/score/userext.inl>
223#endif
224
225#ifdef __cplusplus
226}
227#endif
228
229#endif
230/* end of include file */
Note: See TracBrowser for help on using the repository browser.