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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [inline/] [rtems/] [rtems/] [attr.inl] - Blame information for rev 593

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

Line No. Rev Author Line
1 30 unneback
/*  inline/attr.inl
2
 *
3
 *  This include file contains all of the inlined routines associated
4
 *  with attributes.
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: attr.inl,v 1.2 2001-09-27 11:59:18 chris Exp $
14
 */
15
 
16
#ifndef __INLINE_ATTRIBUTES_inl
17
#define __INLINE_ATTRIBUTES_inl
18
 
19
/*PAGE
20
 *
21
 *  _Attributes_Set
22
 *
23
 *  DESCRIPTION:
24
 *
25
 *  This function sets the requested new_attributes in the attribute_set
26
 *  passed in.  The result is returned to the user.
27
 */
28
 
29
RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Set (
30
   rtems_attribute new_attributes,
31
   rtems_attribute attribute_set
32
)
33
{
34
  return attribute_set | new_attributes;
35
}
36
 
37
/*PAGE
38
 *
39
 *  _Attributes_Clear
40
 *
41
 *  DESCRIPTION:
42
 *
43
 *  This function clears the requested new_attributes in the attribute_set
44
 *  passed in.  The result is returned to the user.
45
 */
46
 
47
RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Clear (
48
   rtems_attribute attribute_set,
49
   rtems_attribute mask
50
)
51
{
52
  return attribute_set & ~mask;
53
}
54
 
55
/*PAGE
56
 *
57
 *  _Attributes_Is_floating_point
58
 *
59
 *  DESCRIPTION:
60
 *
61
 *  This function returns TRUE if the floating point attribute is
62
 *  enabled in the attribute_set and FALSE otherwise.
63
 */
64
 
65
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_floating_point(
66
  rtems_attribute attribute_set
67
)
68
{
69
   return ( attribute_set & RTEMS_FLOATING_POINT );
70
}
71
 
72
/*PAGE
73
 *
74
 *  _Attributes_Is_global
75
 *
76
 *  DESCRIPTION:
77
 *
78
 *  This function returns TRUE if the global object attribute is
79
 *  enabled in the attribute_set and FALSE otherwise.
80
 */
81
 
82
#if defined(RTEMS_MULTIPROCESSING)
83
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_global(
84
  rtems_attribute attribute_set
85
)
86
{
87
   return ( attribute_set & RTEMS_GLOBAL );
88
}
89
#endif
90
 
91
/*PAGE
92
 *
93
 *  _Attributes_Is_priority
94
 *
95
 *  DESCRIPTION:
96
 *
97
 *  This function returns TRUE if the priority attribute is
98
 *  enabled in the attribute_set and FALSE otherwise.
99
 */
100
 
101
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority(
102
  rtems_attribute attribute_set
103
)
104
{
105
   return ( attribute_set & RTEMS_PRIORITY );
106
}
107
 
108
/*PAGE
109
 *
110
 *  _Attributes_Is_binary_semaphore
111
 *
112
 *  DESCRIPTION:
113
 *
114
 *  This function returns TRUE if the binary semaphore attribute is
115
 *  enabled in the attribute_set and FALSE otherwise.
116
 */
117
 
118
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_binary_semaphore(
119
  rtems_attribute attribute_set
120
)
121
{
122
  return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
123
}
124
 
125
/*PAGE
126
 *
127
 *  _Attributes_Is_simple_binary_semaphore
128
 *
129
 *  DESCRIPTION:
130
 *
131
 *  This function returns TRUE if the simple binary semaphore attribute is
132
 *  enabled in the attribute_set and FALSE otherwise.
133
 */
134
 
135
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_simple_binary_semaphore(
136
  rtems_attribute attribute_set
137
)
138
{
139
  return
140
    ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_SIMPLE_BINARY_SEMAPHORE);
141
}
142
 
143
/*PAGE
144
 *
145
 *  _Attributes_Is_counting_semaphore
146
 *
147
 *  DESCRIPTION:
148
 *
149
 *  This function returns TRUE if the counting semaphore attribute is
150
 *  enabled in the attribute_set and FALSE otherwise.
151
 */
152
 
153
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_counting_semaphore(
154
  rtems_attribute attribute_set
155
)
156
{
157
  return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
158
}
159
 
160
/*PAGE
161
 *
162
 *  _Attributes_Is_inherit_priority
163
 *
164
 *  DESCRIPTION:
165
 *
166
 *  This function returns TRUE if the priority inheritance attribute
167
 *  is enabled in the attribute_set and FALSE otherwise.
168
 */
169
 
170
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_inherit_priority(
171
  rtems_attribute attribute_set
172
)
173
{
174
   return ( attribute_set & RTEMS_INHERIT_PRIORITY );
175
}
176
 
177
/*PAGE
178
 *
179
 *  _Attributes_Is_priority_ceiling
180
 *
181
 *  DESCRIPTION:
182
 *
183
 *  This function returns TRUE if the priority ceiling attribute
184
 *  is enabled in the attribute_set and FALSE otherwise.
185
 */
186
 
187
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority_ceiling(
188
  rtems_attribute attribute_set
189
)
190
{
191
   return ( attribute_set & RTEMS_PRIORITY_CEILING );
192
}
193
 
194
/*PAGE
195
 *
196
 *  _Attributes_Is_system_task
197
 *
198
 *  DESCRIPTION:
199
 *
200
 *  This function returns TRUE if the system task attribute
201
 *  is enabled in the attribute_set and FALSE otherwise.
202
 */
203
 
204
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_system_task(
205
  rtems_attribute attribute_set
206
)
207
{
208
   return ( attribute_set & RTEMS_PRIORITY_CEILING );
209
}
210
 
211
#endif
212
/* end of include file */

powered by: WebSVN 2.1.0

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