1 | /* attr.h |
---|
2 | * |
---|
3 | * This include file contains all information about the Object Attributes |
---|
4 | * Handler. |
---|
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 __RTEMS_ATTRIBUTES_h |
---|
18 | #define __RTEMS_ATTRIBUTES_h |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif |
---|
23 | |
---|
24 | /* types */ |
---|
25 | |
---|
26 | typedef unsigned32 rtems_attribute; |
---|
27 | |
---|
28 | /* constants */ |
---|
29 | |
---|
30 | #define RTEMS_DEFAULT_ATTRIBUTES 0x00000000 |
---|
31 | |
---|
32 | #define RTEMS_NO_FLOATING_POINT 0x00000000 /* don't use FP HW */ |
---|
33 | #define RTEMS_FLOATING_POINT 0x00000001 /* utilize coprocessor */ |
---|
34 | |
---|
35 | #define RTEMS_LOCAL 0x00000000 /* local resource */ |
---|
36 | #define RTEMS_GLOBAL 0x00000002 /* global resource */ |
---|
37 | |
---|
38 | #define RTEMS_FIFO 0x00000000 /* process RTEMS_FIFO */ |
---|
39 | #define RTEMS_PRIORITY 0x00000004 /* process by priority */ |
---|
40 | |
---|
41 | #define RTEMS_NO_LIMIT 0x00000000 /* unlimited Q entries */ |
---|
42 | #define RTEMS_LIMIT 0x00000008 /* limit Q entries */ |
---|
43 | |
---|
44 | #define RTEMS_COUNTING_SEMAPHORE 0x00000000 |
---|
45 | #define RTEMS_BINARY_SEMAPHORE 0x00000010 |
---|
46 | |
---|
47 | #define RTEMS_NO_INHERIT_PRIORITY 0x00000000 |
---|
48 | #define RTEMS_INHERIT_PRIORITY 0x00000020 |
---|
49 | |
---|
50 | #if ( CPU_HARDWARE_FP == TRUE ) |
---|
51 | #define ATTRIBUTES_NOT_SUPPORTED 0 |
---|
52 | #else |
---|
53 | #define ATTRIBUTES_NOT_SUPPORTED RTEMS_FLOATING_POINT |
---|
54 | #endif |
---|
55 | |
---|
56 | #if ( CPU_ALL_TASKS_ARE_FP == TRUE ) |
---|
57 | #define ATTRIBUTES_REQUIRED RTEMS_FLOATING_POINT |
---|
58 | #else |
---|
59 | #define ATTRIBUTES_REQUIRED 0 |
---|
60 | #endif |
---|
61 | |
---|
62 | /* |
---|
63 | * _Attributes_Handler_initialization |
---|
64 | * |
---|
65 | * DESCRIPTION: |
---|
66 | * |
---|
67 | * This routine performs initialization for this handler. |
---|
68 | * |
---|
69 | * NOTE: There is no initialization required in C. Conditional compilation |
---|
70 | * takes care of this in C. |
---|
71 | */ |
---|
72 | |
---|
73 | #define _Attributes_Handler_initialization() |
---|
74 | |
---|
75 | /* |
---|
76 | * _Attributes_Set |
---|
77 | * |
---|
78 | * DESCRIPTION: |
---|
79 | * |
---|
80 | * This function sets the requested new_attributes in the attribute_set |
---|
81 | * passed in. The result is returned to the user. |
---|
82 | */ |
---|
83 | |
---|
84 | STATIC INLINE rtems_attribute _Attributes_Set ( |
---|
85 | rtems_attribute new_attributes, |
---|
86 | rtems_attribute attribute_set |
---|
87 | ); |
---|
88 | |
---|
89 | /* |
---|
90 | * _Attributes_Clear |
---|
91 | * |
---|
92 | * DESCRIPTION: |
---|
93 | * |
---|
94 | * This function clears the requested new_attributes in the attribute_set |
---|
95 | * passed in. The result is returned to the user. |
---|
96 | */ |
---|
97 | |
---|
98 | STATIC INLINE rtems_attribute _Attributes_Clear ( |
---|
99 | rtems_attribute attribute_set, |
---|
100 | rtems_attribute mask |
---|
101 | ); |
---|
102 | |
---|
103 | /* |
---|
104 | * _Attributes_Is_floating_point |
---|
105 | * |
---|
106 | * DESCRIPTION: |
---|
107 | * |
---|
108 | * This function returns TRUE if the floating point attribute is |
---|
109 | * enabled in the attribute_set and FALSE otherwise. |
---|
110 | */ |
---|
111 | |
---|
112 | STATIC INLINE boolean _Attributes_Is_floating_point( |
---|
113 | rtems_attribute attribute_set |
---|
114 | ); |
---|
115 | |
---|
116 | /* |
---|
117 | * _Attributes_Is_global |
---|
118 | * |
---|
119 | * DESCRIPTION: |
---|
120 | * |
---|
121 | * This function returns TRUE if the global object attribute is |
---|
122 | * enabled in the attribute_set and FALSE otherwise. |
---|
123 | */ |
---|
124 | |
---|
125 | STATIC INLINE boolean _Attributes_Is_global( |
---|
126 | rtems_attribute attribute_set |
---|
127 | ); |
---|
128 | |
---|
129 | /* |
---|
130 | * _Attributes_Is_priority |
---|
131 | * |
---|
132 | * DESCRIPTION: |
---|
133 | * |
---|
134 | * This function returns TRUE if the priority attribute is |
---|
135 | * enabled in the attribute_set and FALSE otherwise. |
---|
136 | */ |
---|
137 | |
---|
138 | STATIC INLINE boolean _Attributes_Is_priority( |
---|
139 | rtems_attribute attribute_set |
---|
140 | ); |
---|
141 | |
---|
142 | /* |
---|
143 | * _Attributes_Is_limit |
---|
144 | * |
---|
145 | * DESCRIPTION: |
---|
146 | * |
---|
147 | * This function returns TRUE if the limited attribute is |
---|
148 | * enabled in the attribute_set and FALSE otherwise. |
---|
149 | */ |
---|
150 | |
---|
151 | STATIC INLINE boolean _Attributes_Is_limit( |
---|
152 | rtems_attribute attribute_set |
---|
153 | ); |
---|
154 | |
---|
155 | /* |
---|
156 | * _Attributes_Is_binary_semaphore |
---|
157 | * |
---|
158 | * DESCRIPTION: |
---|
159 | * |
---|
160 | * This function returns TRUE if the binary semaphore attribute is |
---|
161 | * enabled in the attribute_set and FALSE otherwise. |
---|
162 | */ |
---|
163 | |
---|
164 | STATIC INLINE boolean _Attributes_Is_binary_semaphore( |
---|
165 | rtems_attribute attribute_set |
---|
166 | ); |
---|
167 | |
---|
168 | /* |
---|
169 | * _Attributes_Is_inherit_priority |
---|
170 | * |
---|
171 | * DESCRIPTION: |
---|
172 | * |
---|
173 | * This function returns TRUE if the priority inheritance attribute |
---|
174 | * is enabled in the attribute_set and FALSE otherwise. |
---|
175 | */ |
---|
176 | |
---|
177 | STATIC INLINE boolean _Attributes_Is_inherit_priority( |
---|
178 | rtems_attribute attribute_set |
---|
179 | ); |
---|
180 | |
---|
181 | #include <rtems/attr.inl> |
---|
182 | |
---|
183 | #ifdef __cplusplus |
---|
184 | } |
---|
185 | #endif |
---|
186 | |
---|
187 | #endif |
---|
188 | /* end of include file */ |
---|