20 #ifndef _RTEMS_SCORE_OBJECT_H 21 #define _RTEMS_SCORE_OBJECT_H 24 #include <rtems/score/cpu.h> 38 #if defined(RTEMS_POSIX_API) 45 #define RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES 69 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) 77 #if defined(RTEMS_USE_16_BIT_OBJECT) 94 #define OBJECTS_INDEX_START_BIT 0U 95 #define OBJECTS_API_START_BIT 8U 96 #define OBJECTS_CLASS_START_BIT 11U 98 #define OBJECTS_INDEX_MASK (Objects_Id)0x00ffU 99 #define OBJECTS_API_MASK (Objects_Id)0x0700U 100 #define OBJECTS_CLASS_MASK (Objects_Id)0xF800U 102 #define OBJECTS_INDEX_VALID_BITS (Objects_Id)0x00ffU 103 #define OBJECTS_API_VALID_BITS (Objects_Id)0x0007U 105 #define OBJECTS_CLASS_VALID_BITS (Objects_Id)0x001fU 107 #define OBJECTS_UNLIMITED_OBJECTS 0x8000U 109 #define OBJECTS_ID_INITIAL_INDEX (0) 110 #define OBJECTS_ID_FINAL_INDEX (0xff) 134 #define OBJECTS_INDEX_START_BIT 0U 139 #define OBJECTS_NODE_START_BIT 16U 145 #define OBJECTS_API_START_BIT 24U 151 #define OBJECTS_CLASS_START_BIT 27U 156 #define OBJECTS_INDEX_MASK (Objects_Id)0x0000ffffU 161 #define OBJECTS_NODE_MASK (Objects_Id)0x00ff0000U 166 #define OBJECTS_API_MASK (Objects_Id)0x07000000U 171 #define OBJECTS_CLASS_MASK (Objects_Id)0xf8000000U 177 #define OBJECTS_INDEX_VALID_BITS (Objects_Id)0x0000ffffU 183 #define OBJECTS_NODE_VALID_BITS (Objects_Id)0x000000ffU 189 #define OBJECTS_API_VALID_BITS (Objects_Id)0x00000007U 195 #define OBJECTS_CLASS_VALID_BITS (Objects_Id)0x0000001fU 201 #define OBJECTS_UNLIMITED_OBJECTS 0x80000000U 206 #define OBJECTS_ID_INITIAL_INDEX (0) 211 #define OBJECTS_ID_FINAL_INDEX (0xffffU) 219 OBJECTS_INTERNAL_API = 1,
220 OBJECTS_CLASSIC_API = 2,
221 OBJECTS_POSIX_API = 3,
222 OBJECTS_FAKE_OBJECTS_API = 7
226 #define OBJECTS_APIS_LAST OBJECTS_POSIX_API 241 #if defined( RTEMS_MULTIPROCESSING ) 254 } Objects_MP_Control;
260 #define OBJECTS_ID_NONE 0 266 #define OBJECTS_ID_OF_SELF ((Objects_Id) 0) 272 #define OBJECTS_SEARCH_ALL_NODES 0 278 #define OBJECTS_SEARCH_OTHER_NODES 0x7FFFFFFE 284 #define OBJECTS_SEARCH_LOCAL_NODE 0x7FFFFFFF 290 #define OBJECTS_WHO_AM_I 0 296 #define OBJECTS_ID_INITIAL(_api, _class, _node) \ 297 _Objects_Build_id( (_api), (_class), (_node), OBJECTS_ID_INITIAL_INDEX ) 302 #define OBJECTS_ID_FINAL ((Objects_Id)~0) 314 #define _Objects_Build_name( _C1, _C2, _C3, _C4 ) \ 315 ( (uint32_t)(_C1) << 24 | \ 316 (uint32_t)(_C2) << 16 | \ 317 (uint32_t)(_C3) << 8 | \ 362 #if defined(RTEMS_USE_16_BIT_OBJECT) 406 #
if !defined(RTEMS_USE_16_BIT_OBJECT)
429 #define _Objects_Maximum_per_allocation( maximum ) \ 430 ((Objects_Maximum) ((maximum) & ~OBJECTS_UNLIMITED_OBJECTS)) uint32_t name_u32
This is the actual 32-bit "raw" integer name.
Definition: object.h:74
This is used to manage each element (node) which is placed on a chain.
Definition: chain.h:65
#define OBJECTS_API_VALID_BITS
This mask represents the bits that is used to ensure no extra bits are set after shifting to extract ...
Definition: object.h:189
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(Objects_Id id)
This function returns the API portion of the ID.
Definition: object.h:327
The following defines the Object Control Block used to manage each object local to this node...
Definition: object.h:232
RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index(Objects_Id id)
This function returns the index portion of the ID.
Definition: object.h:376
#define OBJECTS_INDEX_VALID_BITS
This mask represents the bits that is used to ensure no extra bits are set after shifting to extract ...
Definition: object.h:177
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
#define OBJECTS_CLASS_VALID_BITS
This mask represents the bits that is used to ensure no extra bits are set after shifting to extract ...
Definition: object.h:195
#define OBJECTS_CLASS_START_BIT
This is the bit position of the starting bit of the class portion of the object Id.
Definition: object.h:151
RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id(Objects_APIs the_api, uint16_t the_class, uint8_t node, uint16_t index)
This function builds an object's id from the processor node and index values specified.
Definition: object.h:397
#define OBJECTS_UNLIMITED_OBJECTS
Mask to enable unlimited objects.
Definition: object.h:201
#define OBJECTS_INDEX_START_BIT
This is the bit position of the starting bit of the index portion of the object Id.
Definition: object.h:134
#define OBJECTS_API_START_BIT
This is the bit position of the starting bit of the API portion of the object Id. ...
Definition: object.h:145
Chain_Node Node
This is the chain node portion of an object.
Definition: object.h:234
#define OBJECTS_NODE_VALID_BITS
This mask represents the bits that is used to ensure no extra bits are set after shifting to extract ...
Definition: object.h:183
RTEMS_INLINE_ROUTINE bool _Objects_Is_unlimited(uint32_t maximum)
Returns if the object maximum specifies unlimited objects.
Definition: object.h:420
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(Objects_Id id)
This function returns the class portion of the ID.
Definition: object.h:339
uint16_t Objects_Maximum
This type is used to store the maximum number of allowed objects of each type.
Definition: object.h:128
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node(Objects_Id id)
This function returns the node portion of the ID.
Definition: object.h:354
Objects_Name name
This is the object's name.
Definition: object.h:238
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
The following type defines the control block used to manage object names.
Definition: object.h:68
#define OBJECTS_NODE_START_BIT
This is the bit position of the starting bit of the node portion of the object Id.
Definition: object.h:139
Objects_APIs
This enumerated type is used in the class field of the object ID.
Definition: object.h:217
Objects_Id id
This is the object's ID.
Definition: object.h:236