source: rtems/c/src/exec/rtems/inline/attr.inl @ 1a8fde6c

4.104.114.84.95
Last change on this file since 1a8fde6c was 1a8fde6c, checked in by Joel Sherrill <joel.sherrill@…>, on 03/06/96 at 21:34:57

Removed prototyes for static inline routines and moved the comments into
the inline implementation. The impetus for this was twofold. First,
it is incorrect to have static inline prototypes when using the macro
implementation. Second, this reduced the number of lines in the include
files seen by rtems.h by about 2000 lines.

Next we restricted visibility for the inline routines to inside the
executive itself EXCEPT for a handful of objects. This reduced the
number of include files included by rtems.h by 40 files and reduced
the lines in the include files seen by rtems.h by about 6000 lines.

In total, these reduced the compile time of the entire RTEMS tree by 20%.
This results in about 8 minutes savings on the SparcStation? 10 morgana.

  • Property mode set to 100644
File size: 3.2 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, 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 __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
30STATIC INLINE 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
48STATIC INLINE 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
66STATIC INLINE 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
83STATIC INLINE 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
100STATIC INLINE 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
117STATIC INLINE 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
134STATIC INLINE 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 
151STATIC INLINE 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 */
Note: See TracBrowser for help on using the repository browser.