RTEMS CPU Kit with SuperCore  4.10.99.0
Defines | Functions
rtems/score/object.inl File Reference

Inlined Routines in the Object Handler. More...

This graph shows which files directly or indirectly include this file:

Defines

#define _RTEMS_SCORE_OBJECT_INL
#define _Objects_Maximum_per_allocation(maximum)   ((Objects_Maximum) ((maximum) & ~OBJECTS_UNLIMITED_OBJECTS))

Functions

RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id (Objects_APIs the_api, uint32_t the_class, uint32_t node, uint32_t index)
 This function builds an object's id from the processor node and index values specified.
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API (Objects_Id id)
 This function returns the API portion of the ID.
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class (Objects_Id id)
 This function returns the class portion of the ID.
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node (Objects_Id id)
 This function returns the node portion of the ID.
RTEMS_INLINE_ROUTINE
Objects_Maximum 
_Objects_Get_index (Objects_Id id)
 This function returns the index portion of the ID.
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid (uint32_t the_api)
 This function returns true if the api is valid.
RTEMS_INLINE_ROUTINE bool _Objects_Is_local_node (uint32_t node)
 This function returns true if the node is of the local object, and false otherwise.
RTEMS_INLINE_ROUTINE bool _Objects_Is_local_id (Objects_Id id __attribute__((unused)))
 This function returns true if the id is of a local object, and false otherwise.
RTEMS_INLINE_ROUTINE bool _Objects_Are_ids_equal (Objects_Id left, Objects_Id right)
 This function returns true if left and right are equal, and false otherwise.
RTEMS_INLINE_ROUTINE
Objects_Control
_Objects_Get_local_object (Objects_Information *information, uint16_t index)
 This function returns a pointer to the local_table object referenced by the index.
RTEMS_INLINE_ROUTINE void _Objects_Set_local_object (Objects_Information *information, uint32_t index, Objects_Control *the_object)
 This function sets the pointer to the local_table object referenced by the index.
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id (Objects_Information *information, Objects_Control *the_object)
 This function sets the pointer to the local_table object referenced by the index to a NULL so the object Id is invalid after this call.
RTEMS_INLINE_ROUTINE void _Objects_Open (Objects_Information *information, Objects_Control *the_object, Objects_Name name)
 This function places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.
RTEMS_INLINE_ROUTINE void _Objects_Open_u32 (Objects_Information *information, Objects_Control *the_object, uint32_t name)
 This function places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.
RTEMS_INLINE_ROUTINE void _Objects_Open_string (Objects_Information *information, Objects_Control *the_object, const char *name)
 This function places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.
RTEMS_INLINE_ROUTINE bool _Objects_Is_unlimited (uint32_t maximum)
 Returns if the object maximum specifies unlimited objects.

Detailed Description

Inlined Routines in the Object Handler.

This include file contains the static inline implementation of all of the inlined routines in the Object Handler.


Function Documentation

RTEMS_INLINE_ROUTINE bool _Objects_Are_ids_equal ( Objects_Id  left,
Objects_Id  right 
)

This function returns true if left and right are equal, and false otherwise.

Parameters:
[in]leftis the Id on the left hand side of the comparison
[in]rightis the Id on the right hand side of the comparison
Returns:
This method returns true if the specified object IDs are equal and false otherwise.
RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id ( Objects_APIs  the_api,
uint32_t  the_class,
uint32_t  node,
uint32_t  index 
)

This function builds an object's id from the processor node and index values specified.

Parameters:
[in]the_apiindicates the API associated with this Id.
[in]the_classindicates the class of object. It is specific to the_api.
[in]nodeis the node where this object resides.
[in]indexis the instance number of this object.
Returns:
This method returns an object Id constructed from the arguments.

References OBJECTS_API_START_BIT, OBJECTS_CLASS_START_BIT, OBJECTS_NODE_START_BIT, and OBJECTS_INDEX_START_BIT.

RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API ( Objects_Id  id)

This function returns the API portion of the ID.

Parameters:
[in]idis the object Id to be processed.
Returns:
This method returns an object Id constructed from the arguments.

References OBJECTS_API_START_BIT, and OBJECTS_API_VALID_BITS.

RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class ( Objects_Id  id)

This function returns the class portion of the ID.

Parameters:
[in]idis the object Id to be processed

References OBJECTS_CLASS_START_BIT, and OBJECTS_CLASS_VALID_BITS.

RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index ( Objects_Id  id)

This function returns the index portion of the ID.

Parameters:
[in]idis the Id to be processed
Returns:
This method returns the class portion of the specified object ID.

References OBJECTS_INDEX_START_BIT, and OBJECTS_INDEX_VALID_BITS.

Referenced by _Objects_Invalidate_Id(), _Objects_Open(), _Objects_Open_u32(), and _Objects_Open_string().

RTEMS_INLINE_ROUTINE Objects_Control* _Objects_Get_local_object ( Objects_Information information,
uint16_t  index 
)

This function returns a pointer to the local_table object referenced by the index.

Parameters:
[in]informationpoints to an Object Information Table
[in]indexis the index of the object the caller wants to access
Returns:
This method returns a pointer to a local object or NULL if the index is invalid and RTEMS_DEBUG is enabled.

References Objects_Information::maximum, and Objects_Information::local_table.

RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node ( Objects_Id  id)

This function returns the node portion of the ID.

Parameters:
[in]idis the object Id to be processed
Returns:
This method returns the node portion of an object ID.

References OBJECTS_NODE_START_BIT, and OBJECTS_NODE_VALID_BITS.

Referenced by _Objects_Is_local_id().

RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id ( Objects_Information information,
Objects_Control the_object 
)

This function sets the pointer to the local_table object referenced by the index to a NULL so the object Id is invalid after this call.

Parameters:
[in]informationpoints to an Object Information Table
[in]the_objectis the local object pointer
Note:
This routine is ONLY to be called in places where the index portion of the Id is known to be good. This is OK since it is normally called from object create/init or delete/destroy operations.

References _Objects_Set_local_object(), _Objects_Get_index(), and Objects_Control::id.

RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid ( uint32_t  the_api)

This function returns true if the api is valid.

Parameters:
[in]the_apiis the api portion of an object ID.
Returns:
This method returns true if the specified api value is valid and false otherwise.

References OBJECTS_APIS_LAST.

RTEMS_INLINE_ROUTINE bool _Objects_Is_local_id ( Objects_Id id   __attribute__(unused))

This function returns true if the id is of a local object, and false otherwise.

Parameters:
[in]idis an object ID
Returns:
This method returns true if the specified object Id is local and false otherwise.
Note:
On a single processor configuration, this always returns true.

References _Objects_Is_local_node(), and _Objects_Get_node().

RTEMS_INLINE_ROUTINE bool _Objects_Is_local_node ( uint32_t  node)

This function returns true if the node is of the local object, and false otherwise.

Parameters:
[in]nodeis the node number and corresponds to the node number portion of an object ID.
Returns:
This method returns true if the specified node is the local node and false otherwise.

References _Objects_Local_node.

Referenced by _Objects_Is_local_id().

RTEMS_INLINE_ROUTINE bool _Objects_Is_unlimited ( uint32_t  maximum)

Returns if the object maximum specifies unlimited objects.

Parameters:
[in]maximumThe object maximum specification.
Return values:
trueUnlimited objects are available.
falseThe object count is fixed.

References OBJECTS_UNLIMITED_OBJECTS.

RTEMS_INLINE_ROUTINE void _Objects_Open ( Objects_Information information,
Objects_Control the_object,
Objects_Name  name 
)

This function places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.

Parameters:
[in]informationpoints to an Object Information Table
[in]the_objectis a pointer to an object
[in]nameis the name of the object to make accessible

References _Objects_Set_local_object(), _Objects_Get_index(), Objects_Control::id, and Objects_Control::name.

RTEMS_INLINE_ROUTINE void _Objects_Open_string ( Objects_Information information,
Objects_Control the_object,
const char *  name 
)

This function places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.

Parameters:
[in]informationpoints to an Object Information Table
[in]the_objectis a pointer to an object
[in]nameis the name of the object to make accessible

References _Objects_Set_local_object(), _Objects_Get_index(), Objects_Control::id, Objects_Control::name, and Objects_Name::name_p.

RTEMS_INLINE_ROUTINE void _Objects_Open_u32 ( Objects_Information information,
Objects_Control the_object,
uint32_t  name 
)

This function places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.

Parameters:
[in]informationpoints to an Object Information Table
[in]the_objectis a pointer to an object
[in]nameis the name of the object to make accessible

References _Objects_Set_local_object(), _Objects_Get_index(), Objects_Control::id, Objects_Control::name, and Objects_Name::name_u32.

RTEMS_INLINE_ROUTINE void _Objects_Set_local_object ( Objects_Information information,
uint32_t  index,
Objects_Control the_object 
)

This function sets the pointer to the local_table object referenced by the index.

Parameters:
[in]informationpoints to an Object Information Table
[in]indexis the index of the object the caller wants to access
[in]the_objectis the local object pointer
Note:
This routine is ONLY to be called in places where the index portion of the Id is known to be good. This is OK since it is normally called from object create/init or delete/destroy operations.

References Objects_Information::maximum, and Objects_Information::local_table.

Referenced by _Objects_Invalidate_Id(), _Objects_Open(), _Objects_Open_u32(), and _Objects_Open_string().