source: rtems/c/src/exec/score/headers/userext.h @ 0451b44

4.104.114.84.95
Last change on this file since 0451b44 was 0451b44, checked in by Joel Sherrill <joel.sherrill@…>, on 04/15/98 at 00:02:10

Per suggestion from Eric Norum, went from one initial extension set
to multiple. This lets the stack check extension be installed
at system initialization time and avoids the BSP having to
even know about its existence.

  • Property mode set to 100644
File size: 5.0 KB
RevLine 
[ac7d5ef0]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
[3a4ae6c]5 *  all user extensions.
[ac7d5ef0]6 *
[60b791ad]7 *  COPYRIGHT (c) 1989-1998.
[ac7d5ef0]8 *  On-Line Applications Research Corporation (OAR).
[03f2154e]9 *  Copyright assigned to U.S. Government, 1994.
[ac7d5ef0]10 *
[98e4ebf5]11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
[03f2154e]13 *  http://www.OARcorp.com/rtems/license.html.
[ac7d5ef0]14 *
15 *  $Id$
16 */
17
[3a4ae6c]18#ifndef __USER_EXTENSIONS_h
19#define __USER_EXTENSIONS_h
[ac7d5ef0]20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
[5e9b32b]25#include <rtems/score/interr.h>
26#include <rtems/score/chain.h>
27#include <rtems/score/thread.h>
[3a4ae6c]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 
[b5fc21c]63typedef User_extensions_routine (
64                                *User_extensions_thread_post_switch_extension )(
65                 Thread_Control *
66             );
67 
[3a4ae6c]68typedef User_extensions_routine ( *User_extensions_thread_begin_extension )(
69                 Thread_Control *
70             );
71 
72typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )(
73                 Thread_Control *
74             );
75 
76typedef User_extensions_routine ( *User_extensions_fatal_extension )(
77                 Internal_errors_Source  /* the_source  */,
78                 boolean                 /* is_internal */,
79                 unsigned32              /* the_error   */
80             );
81
82 
83typedef struct {
84  User_extensions_thread_create_extension       thread_create;
85  User_extensions_thread_start_extension        thread_start;
86  User_extensions_thread_restart_extension      thread_restart;
87  User_extensions_thread_delete_extension       thread_delete;
88  User_extensions_thread_switch_extension       thread_switch;
89  User_extensions_thread_begin_extension        thread_begin;
90  User_extensions_thread_exitted_extension      thread_exitted;
91  User_extensions_fatal_extension               fatal;
92}   User_extensions_Table;
[ac7d5ef0]93
94/*
95 *  The following is used to manage each user extension set.
96 */
97
98typedef struct {
[3a4ae6c]99  Chain_Node              Node;
100  User_extensions_Table   Callouts;
[ac7d5ef0]101}   User_extensions_Control;
102
103/*
104 *  The following is used to manage the list of active extensions.
105 */
106
[c627b2a3]107SCORE_EXTERN Chain_Control _User_extensions_List;
[ac7d5ef0]108
109/*
[3a4ae6c]110 *  _User_extensions_Thread_create
[ac7d5ef0]111 *
112 *  DESCRIPTION:
113 *
114 *  This routine is used to invoke the user extension for
[3a4ae6c]115 *  the thread creation operate.
[ac7d5ef0]116 */
117
[3a4ae6c]118boolean _User_extensions_Thread_create (
[ac7d5ef0]119  Thread_Control *the_thread
120);
121
122/*
[3a4ae6c]123 *  _User_extensions_Thread_delete
[ac7d5ef0]124 *
125 *  DESCRIPTION:
126 *
127 *  This routine is used to invoke the user extension for
[3a4ae6c]128 *  the thread deletion operation.
[ac7d5ef0]129 */
130
[3a4ae6c]131void _User_extensions_Thread_delete (
[ac7d5ef0]132  Thread_Control *the_thread
133);
134
135/*
[3a4ae6c]136 *  _User_extensions_Thread_start
[ac7d5ef0]137 *
138 *  DESCRIPTION:
139 *
140 *  This routine is used to invoke the user extension for
[3a4ae6c]141 *  the thread start operation.
[ac7d5ef0]142 */
143
[3a4ae6c]144void _User_extensions_Thread_start (
[ac7d5ef0]145  Thread_Control *the_thread
146);
147
148/*
[3a4ae6c]149 *  _User_extensions_Thread_restart
[ac7d5ef0]150 *
151 *  DESCRIPTION:
152 *
153 *  This routine is used to invoke the user extension for
[3a4ae6c]154 *  the thread restart operation.
[ac7d5ef0]155 */
156
[3a4ae6c]157void _User_extensions_Thread_restart (
[ac7d5ef0]158  Thread_Control *the_thread
159);
160
161/*
[3a4ae6c]162 *  _User_extensions_Thread_begin
[ac7d5ef0]163 *
164 *  DESCRIPTION:
165 *
166 *  This routine is used to invoke the user extension which
[3a4ae6c]167 *  is invoked when a thread begins.
[ac7d5ef0]168 */
169
[3a4ae6c]170void _User_extensions_Thread_begin (
[ac7d5ef0]171  Thread_Control *executing
172);
173
174/*
[3a4ae6c]175 *  _User_extensions_Thread_exitted
[ac7d5ef0]176 *
177 *  DESCRIPTION:
178 *
179 *  This routine is used to invoke the user extension which
[3a4ae6c]180 *  is invoked when a thread exits.
[ac7d5ef0]181 */
182
[3a4ae6c]183void _User_extensions_Thread_exitted (
[ac7d5ef0]184  Thread_Control *executing
185);
186
187/*
188 *  _User_extensions_Fatal
189 *
190 *  DESCRIPTION:
191 *
[3a4ae6c]192 *  This routine is used to invoke the user extension invoked
193 *  when a fatal error occurs.
[ac7d5ef0]194 */
195
[3a4ae6c]196void _User_extensions_Fatal (
197  Internal_errors_Source  the_source,
198  boolean                 is_internal,
199  unsigned32              the_error
[ac7d5ef0]200);
201
[1a8fde6c]202#ifndef __RTEMS_APPLICATION__
[5e9b32b]203#include <rtems/score/userext.inl>
[1a8fde6c]204#endif
[ac7d5ef0]205
206#ifdef __cplusplus
207}
208#endif
209
210#endif
211/* end of include file */
Note: See TracBrowser for help on using the repository browser.