source: rtems/c/src/exec/score/macros/rtems/score/states.inl @ 03f2154e

4.104.114.84.95
Last change on this file since 03f2154e was 03f2154e, checked in by Joel Sherrill <joel.sherrill@…>, on 04/22/97 at 17:20:27

headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.

  • Property mode set to 100644
File size: 3.5 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-1997.
7 *  On-Line Applications Research Corporation (OAR).
8 *  Copyright assigned to U.S. Government, 1994.
9 *
10 *  The license and distribution terms for this file may in
11 *  the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#ifndef __STATES_inl
18#define __STATES_inl
19
20/*PAGE
21 *
22 *  _States_Set
23 *
24 */
25
26#define _States_Set( _states_to_set, _current_state ) \
27   ((_current_state) | (_states_to_set))
28
29/*PAGE
30 *
31 *  _States_Clear
32 *
33 */
34
35#define _States_Clear( _states_to_clear, _current_state ) \
36   ((_current_state) & ~(_states_to_clear))
37
38/*PAGE
39 *
40 *  _States_Is_ready
41 *
42 */
43
44#define _States_Is_ready( _the_states ) \
45   ( (_the_states) == STATES_READY )
46
47/*PAGE
48 *
49 *  _States_Is_only_dormant
50 *
51 */
52
53#define _States_Is_only_dormant( _the_states ) \
54   ( (_the_states) == STATES_DORMANT )
55
56/*PAGE
57 *
58 *  _States_Is_dormant
59 *
60 */
61
62#define _States_Is_dormant( _the_states ) \
63   ( (_the_states) & STATES_DORMANT )
64
65/*PAGE
66 *
67 *  _States_Is_suspended
68 *
69 */
70
71#define _States_Is_suspended( _the_states ) \
72   ( (_the_states) & STATES_SUSPENDED )
73
74/*PAGE
75 *
76 *  _States_Is_Transient
77 *
78 */
79
80#define _States_Is_transient( _the_states ) \
81   ( (_the_states) & STATES_TRANSIENT )
82
83/*PAGE
84 *
85 *  _States_Is_delaying
86 *
87 */
88
89#define _States_Is_delaying( _the_states ) \
90   ( (_the_states) & STATES_DELAYING )
91
92/*PAGE
93 *
94 *  _States_Is_waiting_for_buffer
95 *
96 */
97
98#define _States_Is_waiting_for_buffer( _the_states ) \
99   ( (_the_states) & STATES_WAITING_FOR_BUFFER )
100
101/*PAGE
102 *
103 *  _States_Is_waiting_for_segment
104 *
105 */
106
107#define _States_Is_waiting_for_segment( _the_states ) \
108   ( (_the_states) & STATES_WAITING_FOR_SEGMENT )
109
110/*PAGE
111 *
112 *  _States_Is_waiting_for_message
113 *
114 */
115
116#define _States_Is_waiting_for_message( _the_states ) \
117   ( (_the_states) & STATES_WAITING_FOR_MESSAGE )
118
119/*PAGE
120 *
121 *  _States_Is_waiting_for_event
122 *
123 */
124
125#define _States_Is_waiting_for_event( _the_states ) \
126   ( (_the_states) & STATES_WAITING_FOR_EVENT )
127
128/*PAGE
129 *
130 *  _States_Is_waiting_for_mutex
131 *
132 */
133 
134#define _States_Is_waiting_for_mutex( _the_states ) \
135   ( (_the_states) & STATES_WAITING_FOR_MUTEX )
136
137/*PAGE
138 *
139 *  _States_Is_waiting_for_semaphore
140 *
141 */
142
143#define _States_Is_waiting_for_semaphore( _the_states ) \
144   ( (_the_states) & STATES_WAITING_FOR_SEMAPHORE )
145
146/*PAGE
147 *
148 *  _States_Is_waiting_for_time
149 *
150 */
151
152#define _States_Is_waiting_for_time( _the_states ) \
153   ( (_the_states) & STATES_WAITING_FOR_TIME )
154
155/*PAGE
156 *
157 *  _States_Is_waiting_for_rpc_reply
158 *
159 */
160
161#define _States_Is_waiting_for_rpc_reply( _the_states ) \
162   ( (_the_states) & STATES_WAITING_FOR_RPC_REPLY )
163
164/*PAGE
165 *
166 *  _States_Is_waiting_for_period
167 *
168 */
169
170#define _States_Is_waiting_for_period( _the_states ) \
171   ( (_the_states) & STATES_WAITING_FOR_PERIOD )
172
173/*PAGE
174 *
175 *  _States_Is_locally_blocked
176 *
177 */
178
179#define _States_Is_locally_blocked( _the_states ) \
180   ( (_the_states) & STATES_LOCALLY_BLOCKED )
181
182/*PAGE
183 *
184 *  _States_Is_waiting_on_thread_queue
185 *
186 */
187
188#define _States_Is_waiting_on_thread_queue( _the_states ) \
189   ( (_the_states) & STATES_WAITING_ON_THREAD_QUEUE )
190
191/*PAGE
192 *
193 *  _States_Is_blocked
194 *
195 */
196
197#define _States_Is_blocked( _the_states ) \
198   ( (_the_states) & STATES_BLOCKED )
199
200/*PAGE
201 *
202 *  _States_Are_set
203 *
204 */
205
206#define _States_Are_set( _the_states, _mask ) \
207   ( ((_the_states) & (_mask)) != STATES_READY )
208
209#endif
210/* end of include file */
Note: See TracBrowser for help on using the repository browser.