source: rtems/c/src/exec/rtems/inline/rtems/rtems/attr.inl @ 97e2729d

4.104.114.84.95
Last change on this file since 97e2729d was 97e2729d, checked in by Joel Sherrill <joel.sherrill@…>, on 11/23/98 at 17:38:09

Added --disable-multiprocessing flag and modified a lot of files to make
it work.

  • Property mode set to 100644
File size: 3.6 KB
Line 
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
30RTEMS_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
48RTEMS_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
66RTEMS_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#if defined(RTEMS_MULTIPROCESSING)
84RTEMS_INLINE_ROUTINE boolean _Attributes_Is_global(
85  rtems_attribute attribute_set
86)
87{
88   return ( attribute_set & RTEMS_GLOBAL );
89}
90#endif
91
92/*PAGE
93 *
94 *  _Attributes_Is_priority
95 *
96 *  DESCRIPTION:
97 *
98 *  This function returns TRUE if the priority attribute is
99 *  enabled in the attribute_set and FALSE otherwise.
100 */
101
102RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority(
103  rtems_attribute attribute_set
104)
105{
106   return ( attribute_set & RTEMS_PRIORITY );
107}
108
109/*PAGE
110 *
111 *  _Attributes_Is_binary_semaphore
112 *
113 *  DESCRIPTION:
114 *
115 *  This function returns TRUE if the binary semaphore attribute is
116 *  enabled in the attribute_set and FALSE otherwise.
117 */
118
119RTEMS_INLINE_ROUTINE boolean _Attributes_Is_binary_semaphore(
120  rtems_attribute attribute_set
121)
122{
123  return ( attribute_set & RTEMS_BINARY_SEMAPHORE );
124}
125
126/*PAGE
127 *
128 *  _Attributes_Is_inherit_priority
129 *
130 *  DESCRIPTION:
131 *
132 *  This function returns TRUE if the priority inheritance attribute
133 *  is enabled in the attribute_set and FALSE otherwise.
134 */
135
136RTEMS_INLINE_ROUTINE boolean _Attributes_Is_inherit_priority(
137  rtems_attribute attribute_set
138)
139{
140   return ( attribute_set & RTEMS_INHERIT_PRIORITY );
141}
142
143/*PAGE
144 *
145 *  _Attributes_Is_priority_ceiling
146 *
147 *  DESCRIPTION:
148 *
149 *  This function returns TRUE if the priority ceiling attribute
150 *  is enabled in the attribute_set and FALSE otherwise.
151 */
152 
153RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority_ceiling(
154  rtems_attribute attribute_set
155)
156{
157   return ( attribute_set & RTEMS_PRIORITY_CEILING );
158}
159
160/*PAGE
161 *
162 *  _Attributes_Is_system_task
163 *
164 *  DESCRIPTION:
165 *
166 *  This function returns TRUE if the system task attribute
167 *  is enabled in the attribute_set and FALSE otherwise.
168 */
169 
170RTEMS_INLINE_ROUTINE boolean _Attributes_Is_system_task(
171  rtems_attribute attribute_set
172)
173{
174   return ( attribute_set & RTEMS_PRIORITY_CEILING );
175}
176
177#endif
178/* end of include file */
Note: See TracBrowser for help on using the repository browser.