OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [macros/] [rtems/] [score/] [states.inl] - Blame information for rev 666

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.