source: rtems/c/src/exec/score/include/rtems/score/userext.h @ 7f6a24ab

4.104.114.84.95
Last change on this file since 7f6a24ab was 7f6a24ab, checked in by Joel Sherrill <joel.sherrill@…>, on 08/28/95 at 15:30:29

Added unused priority ceiling parameter to rtems_semaphore_create.

Rearranged code to created thread handler routines to initialize,
start, restart, and "close/delete" a thread.

Made internal threads their own object class. This now uses the
thread support routines for starting and initializing a thread.

Insured deleted tasks are freed to the Inactive pool associated with the
correct Information block.

Added an RTEMS API specific data area to the thread control block.

Beginnings of removing the word "rtems" from the core.

  • Property mode set to 100644
File size: 4.2 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 RTEMS 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 __RTEMS_USER_EXTENSIONS_h
19#define __RTEMS_USER_EXTENSIONS_h
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include <rtems/config.h>
26#include <rtems/thread.h>
27
28/*
29 *  The following is used to manage each user extension set.
30 */
31
32typedef struct {
33  Chain_Node                     Node;
34  rtems_extensions_table  Callouts;
35}   User_extensions_Control;
36
37/*
38 *  The following contains the static extension set which may be
39 *  configured by the application.
40 */
41
42EXTERN User_extensions_Control _User_extensions_Initial;
43
44/*
45 *  The following is used to manage the list of active extensions.
46 */
47
48EXTERN Chain_Control _User_extensions_List;
49
50
51/*
52 *  _User_extensions_Handler_initialization
53 *
54 *  DESCRIPTION:
55 *
56 *  This routine performs the initialization necessary for this handler.
57 */
58
59STATIC INLINE void _User_extensions_Handler_initialization (
60    rtems_extensions_table *initial_extensions
61);
62
63/*
64 *  _User_extensions_Add_set
65 *
66 *  DESCRIPTION:
67 *
68 *  This routine is used to add a user extension set to the active list.
69 */
70
71STATIC INLINE void _User_extensions_Add_set (
72  User_extensions_Control  *the_extension,
73  rtems_extensions_table   *extension_table
74);
75
76/*
77 *  _User_extensions_Remove_set
78 *
79 *  DESCRIPTION:
80 *
81 *  This routine is used to remove a user extension set from the active list.
82 */
83
84STATIC INLINE void _User_extensions_Remove_set (
85  User_extensions_Control  *the_extension
86);
87
88/*
89 *  _User_extensions_Task_create
90 *
91 *  DESCRIPTION:
92 *
93 *  This routine is used to invoke the user extension for
94 *  the rtems_task_create directive.
95 */
96
97STATIC INLINE void _User_extensions_Task_create (
98  Thread_Control *the_thread
99);
100
101/*
102 *  _User_extensions_Task_delete
103 *
104 *  DESCRIPTION:
105 *
106 *  This routine is used to invoke the user extension for
107 *  the rtems_task_delete directive.
108 */
109
110STATIC INLINE void _User_extensions_Task_delete (
111  Thread_Control *the_thread
112);
113
114/*
115 *  _User_extensions_Task_start
116 *
117 *  DESCRIPTION:
118 *
119 *  This routine is used to invoke the user extension for
120 *  the rtems_task_start directive.
121 */
122
123STATIC INLINE void _User_extensions_Task_start (
124  Thread_Control *the_thread
125);
126
127/*
128 *  _User_extensions_Task_restart
129 *
130 *  DESCRIPTION:
131 *
132 *  This routine is used to invoke the user extension for
133 *  the rtems_task_restart directive.
134 */
135
136STATIC INLINE void _User_extensions_Task_restart (
137  Thread_Control *the_thread
138);
139
140/*
141 *  _User_extensions_Task_switch
142 *
143 *  DESCRIPTION:
144 *
145 *  This routine is used to invoke the user extension which
146 *  is invoked when a context switch occurs.
147 */
148
149STATIC INLINE void _User_extensions_Task_switch (
150  Thread_Control *executing,
151  Thread_Control *heir
152);
153
154/*
155 *  _User_extensions_Task_begin
156 *
157 *  DESCRIPTION:
158 *
159 *  This routine is used to invoke the user extension which
160 *  is invoked when a task begins.
161 */
162
163STATIC INLINE void _User_extensions_Task_begin (
164  Thread_Control *executing
165);
166
167/*
168 *  _User_extensions_Task_exitted
169 *
170 *  DESCRIPTION:
171 *
172 *  This routine is used to invoke the user extension which
173 *  is invoked when a task exits.
174 */
175
176STATIC INLINE void _User_extensions_Task_exitted (
177  Thread_Control *executing
178);
179
180/*
181 *  _User_extensions_Task_exitted
182 *
183 *  DESCRIPTION:
184 *
185 *  This routine is used to invoke the user extension which
186 *  is invoked when a task exits.
187 */
188
189STATIC INLINE void _User_extensions_Task_exitted (
190  Thread_Control *executing
191);
192
193/*
194 *  _User_extensions_Fatal
195 *
196 *  DESCRIPTION:
197 *
198 *  This routine is used to invoke the user extension for
199 *  the rtems_fatal_error_occurred directive.
200 */
201
202STATIC INLINE void _User_extensions_Fatal (
203  unsigned32 the_error
204);
205
206#include <rtems/userext.inl>
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.