[ac7d5ef0] | 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 | * |
---|
[199fa36] | 14 | * attr.h,v 1.2 1995/05/31 16:46:08 joel Exp |
---|
[ac7d5ef0] | 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_COUNTING_SEMAPHORE 0x00000000 |
---|
| 42 | #define RTEMS_BINARY_SEMAPHORE 0x00000010 |
---|
| 43 | |
---|
| 44 | #define RTEMS_NO_INHERIT_PRIORITY 0x00000000 |
---|
| 45 | #define RTEMS_INHERIT_PRIORITY 0x00000020 |
---|
| 46 | |
---|
| 47 | #if ( CPU_HARDWARE_FP == TRUE ) |
---|
| 48 | #define ATTRIBUTES_NOT_SUPPORTED 0 |
---|
| 49 | #else |
---|
| 50 | #define ATTRIBUTES_NOT_SUPPORTED RTEMS_FLOATING_POINT |
---|
| 51 | #endif |
---|
| 52 | |
---|
| 53 | #if ( CPU_ALL_TASKS_ARE_FP == TRUE ) |
---|
| 54 | #define ATTRIBUTES_REQUIRED RTEMS_FLOATING_POINT |
---|
| 55 | #else |
---|
| 56 | #define ATTRIBUTES_REQUIRED 0 |
---|
| 57 | #endif |
---|
| 58 | |
---|
| 59 | /* |
---|
| 60 | * _Attributes_Handler_initialization |
---|
| 61 | * |
---|
| 62 | * DESCRIPTION: |
---|
| 63 | * |
---|
| 64 | * This routine performs initialization for this handler. |
---|
| 65 | * |
---|
| 66 | * NOTE: There is no initialization required in C. Conditional compilation |
---|
| 67 | * takes care of this in C. |
---|
| 68 | */ |
---|
| 69 | |
---|
| 70 | #define _Attributes_Handler_initialization() |
---|
| 71 | |
---|
| 72 | /* |
---|
| 73 | * _Attributes_Set |
---|
| 74 | * |
---|
| 75 | * DESCRIPTION: |
---|
| 76 | * |
---|
| 77 | * This function sets the requested new_attributes in the attribute_set |
---|
| 78 | * passed in. The result is returned to the user. |
---|
| 79 | */ |
---|
| 80 | |
---|
| 81 | STATIC INLINE rtems_attribute _Attributes_Set ( |
---|
| 82 | rtems_attribute new_attributes, |
---|
| 83 | rtems_attribute attribute_set |
---|
| 84 | ); |
---|
| 85 | |
---|
| 86 | /* |
---|
| 87 | * _Attributes_Clear |
---|
| 88 | * |
---|
| 89 | * DESCRIPTION: |
---|
| 90 | * |
---|
| 91 | * This function clears the requested new_attributes in the attribute_set |
---|
| 92 | * passed in. The result is returned to the user. |
---|
| 93 | */ |
---|
| 94 | |
---|
| 95 | STATIC INLINE rtems_attribute _Attributes_Clear ( |
---|
| 96 | rtems_attribute attribute_set, |
---|
| 97 | rtems_attribute mask |
---|
| 98 | ); |
---|
| 99 | |
---|
| 100 | /* |
---|
| 101 | * _Attributes_Is_floating_point |
---|
| 102 | * |
---|
| 103 | * DESCRIPTION: |
---|
| 104 | * |
---|
| 105 | * This function returns TRUE if the floating point attribute is |
---|
| 106 | * enabled in the attribute_set and FALSE otherwise. |
---|
| 107 | */ |
---|
| 108 | |
---|
| 109 | STATIC INLINE boolean _Attributes_Is_floating_point( |
---|
| 110 | rtems_attribute attribute_set |
---|
| 111 | ); |
---|
| 112 | |
---|
| 113 | /* |
---|
| 114 | * _Attributes_Is_global |
---|
| 115 | * |
---|
| 116 | * DESCRIPTION: |
---|
| 117 | * |
---|
| 118 | * This function returns TRUE if the global object attribute is |
---|
| 119 | * enabled in the attribute_set and FALSE otherwise. |
---|
| 120 | */ |
---|
| 121 | |
---|
| 122 | STATIC INLINE boolean _Attributes_Is_global( |
---|
| 123 | rtems_attribute attribute_set |
---|
| 124 | ); |
---|
| 125 | |
---|
| 126 | /* |
---|
| 127 | * _Attributes_Is_priority |
---|
| 128 | * |
---|
| 129 | * DESCRIPTION: |
---|
| 130 | * |
---|
| 131 | * This function returns TRUE if the priority attribute is |
---|
| 132 | * enabled in the attribute_set and FALSE otherwise. |
---|
| 133 | */ |
---|
| 134 | |
---|
| 135 | STATIC INLINE boolean _Attributes_Is_priority( |
---|
| 136 | rtems_attribute attribute_set |
---|
| 137 | ); |
---|
| 138 | |
---|
[199fa36] | 139 | #if 0 |
---|
[ac7d5ef0] | 140 | /* |
---|
| 141 | * _Attributes_Is_limit |
---|
| 142 | * |
---|
| 143 | * DESCRIPTION: |
---|
| 144 | * |
---|
| 145 | * This function returns TRUE if the limited attribute is |
---|
| 146 | * enabled in the attribute_set and FALSE otherwise. |
---|
| 147 | */ |
---|
| 148 | |
---|
| 149 | STATIC INLINE boolean _Attributes_Is_limit( |
---|
| 150 | rtems_attribute attribute_set |
---|
| 151 | ); |
---|
[199fa36] | 152 | #endif |
---|
[ac7d5ef0] | 153 | |
---|
| 154 | /* |
---|
| 155 | * _Attributes_Is_binary_semaphore |
---|
| 156 | * |
---|
| 157 | * DESCRIPTION: |
---|
| 158 | * |
---|
| 159 | * This function returns TRUE if the binary semaphore attribute is |
---|
| 160 | * enabled in the attribute_set and FALSE otherwise. |
---|
| 161 | */ |
---|
| 162 | |
---|
| 163 | STATIC INLINE boolean _Attributes_Is_binary_semaphore( |
---|
| 164 | rtems_attribute attribute_set |
---|
| 165 | ); |
---|
| 166 | |
---|
| 167 | /* |
---|
| 168 | * _Attributes_Is_inherit_priority |
---|
| 169 | * |
---|
| 170 | * DESCRIPTION: |
---|
| 171 | * |
---|
| 172 | * This function returns TRUE if the priority inheritance attribute |
---|
| 173 | * is enabled in the attribute_set and FALSE otherwise. |
---|
| 174 | */ |
---|
| 175 | |
---|
| 176 | STATIC INLINE boolean _Attributes_Is_inherit_priority( |
---|
| 177 | rtems_attribute attribute_set |
---|
| 178 | ); |
---|
| 179 | |
---|
| 180 | #include <rtems/attr.inl> |
---|
| 181 | |
---|
| 182 | #ifdef __cplusplus |
---|
| 183 | } |
---|
| 184 | #endif |
---|
| 185 | |
---|
| 186 | #endif |
---|
| 187 | /* end of include file */ |
---|