1 | /* inline/attr.inl |
---|
2 | * |
---|
3 | * This include file contains all of the inlined routines associated |
---|
4 | * with attributes. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989-1998. |
---|
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 be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.OARcorp.com/rtems/license.html. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __INLINE_ATTRIBUTES_inl |
---|
18 | #define __INLINE_ATTRIBUTES_inl |
---|
19 | |
---|
20 | /*PAGE |
---|
21 | * |
---|
22 | * _Attributes_Set |
---|
23 | * |
---|
24 | * DESCRIPTION: |
---|
25 | * |
---|
26 | * This function sets the requested new_attributes in the attribute_set |
---|
27 | * passed in. The result is returned to the user. |
---|
28 | */ |
---|
29 | |
---|
30 | RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Set ( |
---|
31 | rtems_attribute new_attributes, |
---|
32 | rtems_attribute attribute_set |
---|
33 | ) |
---|
34 | { |
---|
35 | return attribute_set | new_attributes; |
---|
36 | } |
---|
37 | |
---|
38 | /*PAGE |
---|
39 | * |
---|
40 | * _Attributes_Clear |
---|
41 | * |
---|
42 | * DESCRIPTION: |
---|
43 | * |
---|
44 | * This function clears the requested new_attributes in the attribute_set |
---|
45 | * passed in. The result is returned to the user. |
---|
46 | */ |
---|
47 | |
---|
48 | RTEMS_INLINE_ROUTINE rtems_attribute _Attributes_Clear ( |
---|
49 | rtems_attribute attribute_set, |
---|
50 | rtems_attribute mask |
---|
51 | ) |
---|
52 | { |
---|
53 | return attribute_set & ~mask; |
---|
54 | } |
---|
55 | |
---|
56 | /*PAGE |
---|
57 | * |
---|
58 | * _Attributes_Is_floating_point |
---|
59 | * |
---|
60 | * DESCRIPTION: |
---|
61 | * |
---|
62 | * This function returns TRUE if the floating point attribute is |
---|
63 | * enabled in the attribute_set and FALSE otherwise. |
---|
64 | */ |
---|
65 | |
---|
66 | RTEMS_INLINE_ROUTINE boolean _Attributes_Is_floating_point( |
---|
67 | rtems_attribute attribute_set |
---|
68 | ) |
---|
69 | { |
---|
70 | return ( attribute_set & RTEMS_FLOATING_POINT ); |
---|
71 | } |
---|
72 | |
---|
73 | /*PAGE |
---|
74 | * |
---|
75 | * _Attributes_Is_global |
---|
76 | * |
---|
77 | * DESCRIPTION: |
---|
78 | * |
---|
79 | * This function returns TRUE if the global object attribute is |
---|
80 | * enabled in the attribute_set and FALSE otherwise. |
---|
81 | */ |
---|
82 | |
---|
83 | RTEMS_INLINE_ROUTINE boolean _Attributes_Is_global( |
---|
84 | rtems_attribute attribute_set |
---|
85 | ) |
---|
86 | { |
---|
87 | return ( attribute_set & RTEMS_GLOBAL ); |
---|
88 | } |
---|
89 | |
---|
90 | /*PAGE |
---|
91 | * |
---|
92 | * _Attributes_Is_priority |
---|
93 | * |
---|
94 | * DESCRIPTION: |
---|
95 | * |
---|
96 | * This function returns TRUE if the priority attribute is |
---|
97 | * enabled in the attribute_set and FALSE otherwise. |
---|
98 | */ |
---|
99 | |
---|
100 | RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority( |
---|
101 | rtems_attribute attribute_set |
---|
102 | ) |
---|
103 | { |
---|
104 | return ( attribute_set & RTEMS_PRIORITY ); |
---|
105 | } |
---|
106 | |
---|
107 | /*PAGE |
---|
108 | * |
---|
109 | * _Attributes_Is_binary_semaphore |
---|
110 | * |
---|
111 | * DESCRIPTION: |
---|
112 | * |
---|
113 | * This function returns TRUE if the binary semaphore attribute is |
---|
114 | * enabled in the attribute_set and FALSE otherwise. |
---|
115 | */ |
---|
116 | |
---|
117 | RTEMS_INLINE_ROUTINE boolean _Attributes_Is_binary_semaphore( |
---|
118 | rtems_attribute attribute_set |
---|
119 | ) |
---|
120 | { |
---|
121 | return ( attribute_set & RTEMS_BINARY_SEMAPHORE ); |
---|
122 | } |
---|
123 | |
---|
124 | /*PAGE |
---|
125 | * |
---|
126 | * _Attributes_Is_inherit_priority |
---|
127 | * |
---|
128 | * DESCRIPTION: |
---|
129 | * |
---|
130 | * This function returns TRUE if the priority inheritance attribute |
---|
131 | * is enabled in the attribute_set and FALSE otherwise. |
---|
132 | */ |
---|
133 | |
---|
134 | RTEMS_INLINE_ROUTINE boolean _Attributes_Is_inherit_priority( |
---|
135 | rtems_attribute attribute_set |
---|
136 | ) |
---|
137 | { |
---|
138 | return ( attribute_set & RTEMS_INHERIT_PRIORITY ); |
---|
139 | } |
---|
140 | |
---|
141 | /*PAGE |
---|
142 | * |
---|
143 | * _Attributes_Is_priority_ceiling |
---|
144 | * |
---|
145 | * DESCRIPTION: |
---|
146 | * |
---|
147 | * This function returns TRUE if the priority ceiling attribute |
---|
148 | * is enabled in the attribute_set and FALSE otherwise. |
---|
149 | */ |
---|
150 | |
---|
151 | RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority_ceiling( |
---|
152 | rtems_attribute attribute_set |
---|
153 | ) |
---|
154 | { |
---|
155 | return ( attribute_set & RTEMS_PRIORITY_CEILING ); |
---|
156 | } |
---|
157 | |
---|
158 | #endif |
---|
159 | /* end of include file */ |
---|