source: rtems/c/src/exec/score/inline/rtems/score/states.inl @ 3a4ae6c

4.104.114.84.95
Last change on this file since 3a4ae6c was 3a4ae6c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/11/95 at 19:35:39

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

  • Property mode set to 100644
File size: 4.4 KB
Line 
1/*  states.inl
2 *
3 *  This file contains the macro implementation of the inlined
4 *  routines associated with thread state information.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  $Id$
15 */
16
17#ifndef __STATES_inl
18#define __STATES_inl
19
20/*PAGE
21 *
22 *  _States_Set
23 *
24 */
25
26STATIC INLINE States_Control _States_Set (
27  States_Control states_to_set,
28  States_Control current_state
29)
30{
31   return (current_state | states_to_set);
32}
33
34/*PAGE
35 *
36 *  _States_Clear
37 *
38 */
39
40STATIC INLINE States_Control _States_Clear (
41  States_Control states_to_clear,
42  States_Control current_state
43)
44{
45   return (current_state & ~states_to_clear);
46}
47
48/*PAGE
49 *
50 *  _States_Is_ready
51 *
52 */
53
54STATIC INLINE boolean _States_Is_ready (
55  States_Control the_states
56)
57{
58   return (the_states == STATES_READY);
59}
60
61/*PAGE
62 *
63 *  _States_Is_only_dormant
64 *
65 */
66
67STATIC INLINE boolean _States_Is_only_dormant (
68  States_Control the_states
69)
70{
71   return (the_states == STATES_DORMANT);
72}
73
74/*PAGE
75 *
76 *  _States_Is_dormant
77 *
78 */
79
80STATIC INLINE boolean _States_Is_dormant (
81  States_Control the_states
82)
83{
84   return (the_states & STATES_DORMANT);
85}
86
87/*PAGE
88 *
89 *  _States_Is_suspended
90 *
91 */
92
93STATIC INLINE boolean _States_Is_suspended (
94  States_Control the_states
95)
96{
97   return (the_states & STATES_SUSPENDED);
98}
99
100/*PAGE
101 *
102 *  _States_Is_Transient
103 *
104 */
105
106STATIC INLINE boolean _States_Is_transient (
107  States_Control the_states
108)
109{
110   return (the_states & STATES_TRANSIENT);
111}
112
113/*PAGE
114 *
115 *  _States_Is_delaying
116 *
117 */
118
119STATIC INLINE boolean _States_Is_delaying (
120  States_Control the_states
121)
122{
123   return (the_states & STATES_DELAYING);
124}
125
126/*PAGE
127 *
128 *  _States_Is_waiting_for_buffer
129 *
130 */
131
132STATIC INLINE boolean _States_Is_waiting_for_buffer (
133  States_Control the_states
134)
135{
136   return (the_states & STATES_WAITING_FOR_BUFFER);
137}
138
139/*PAGE
140 *
141 *  _States_Is_waiting_for_segment
142 *
143 */
144
145STATIC INLINE boolean _States_Is_waiting_for_segment (
146  States_Control the_states
147)
148{
149   return (the_states & STATES_WAITING_FOR_SEGMENT);
150}
151
152/*PAGE
153 *
154 *  _States_Is_waiting_for_message
155 *
156 */
157
158STATIC INLINE boolean _States_Is_waiting_for_message (
159  States_Control the_states
160)
161{
162   return (the_states & STATES_WAITING_FOR_MESSAGE);
163}
164
165/*PAGE
166 *
167 *  _States_Is_waiting_for_event
168 *
169 */
170
171STATIC INLINE boolean _States_Is_waiting_for_event (
172  States_Control the_states
173)
174{
175   return (the_states & STATES_WAITING_FOR_EVENT);
176}
177
178/*PAGE
179 *
180 *  _States_Is_waiting_for_mutex
181 *
182 */
183 
184STATIC INLINE boolean _States_Is_waiting_for_mutex (
185  States_Control the_states
186)
187{
188   return (the_states & STATES_WAITING_FOR_MUTEX);
189}
190
191/*PAGE
192 *
193 *  _States_Is_waiting_for_semaphore
194 *
195 */
196
197STATIC INLINE boolean _States_Is_waiting_for_semaphore (
198  States_Control the_states
199)
200{
201   return (the_states & STATES_WAITING_FOR_SEMAPHORE);
202}
203
204/*PAGE
205 *
206 *  _States_Is_waiting_for_time
207 *
208 */
209
210STATIC INLINE boolean _States_Is_waiting_for_time (
211  States_Control the_states
212)
213{
214   return (the_states & STATES_WAITING_FOR_TIME);
215}
216
217/*PAGE
218 *
219 *  _States_Is_waiting_for_rpc_reply
220 *
221 */
222
223STATIC INLINE boolean _States_Is_waiting_for_rpc_reply (
224  States_Control the_states
225)
226{
227   return (the_states & STATES_WAITING_FOR_RPC_REPLY);
228}
229
230/*PAGE
231 *
232 *  _States_Is_waiting_for_period
233 *
234 */
235
236STATIC INLINE boolean _States_Is_waiting_for_period (
237  States_Control the_states
238)
239{
240   return (the_states & STATES_WAITING_FOR_PERIOD);
241}
242
243/*PAGE
244 *
245 *  _States_Is_locally_blocked
246 *
247 */
248
249STATIC INLINE boolean _States_Is_locally_blocked (
250  States_Control the_states
251)
252{
253   return (the_states & STATES_LOCALLY_BLOCKED);
254}
255
256/*PAGE
257 *
258 *  _States_Is_waiting_on_thread_queue
259 *
260 */
261
262STATIC INLINE boolean _States_Is_waiting_on_thread_queue (
263  States_Control the_states
264)
265{
266   return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
267}
268
269/*PAGE
270 *
271 *  _States_Is_blocked
272 *
273 */
274
275STATIC INLINE boolean _States_Is_blocked (
276  States_Control the_states
277)
278{
279   return (the_states & STATES_BLOCKED);
280}
281
282/*PAGEPAGE
283 *
284 *
285 *  _States_Are_set
286 *
287 */
288
289STATIC INLINE boolean _States_Are_set (
290  States_Control the_states,
291  States_Control mask
292)
293{
294   return ( (the_states & mask) != STATES_READY);
295}
296
297#endif
298/* end of include file */
Note: See TracBrowser for help on using the repository browser.