RTEMS: Object Handler

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Files | Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Object Handler
Internal » SuperCore » CPU Architecture Support

## Files
file | object.h
| Constants and Structures Associated with the Object Handler.
file | objectdata.h
| Object Handler Data Structures.
file | objectimpl.h
| Inlined Routines in the Object Handler.
file | objectallocate.c
| Allocate Object.
file | objectallocatenone.c
file | objectallocatestatic.c
file | objectallocateunlimited.c
file | objectapimaximumclass.c
| Object API Maximum Class.
file | objectclose.c
| Close Object.
file | objectextendinformation.c
| Extend Set of Objects.
file | objectfree.c
| Free Object.
file | objectfreestatic.c
file | objectgetinfo.c
| Get Object Information.
file | objectgetlocal.c
| Object Get Local.
file | objectgetnext.c
| Get Pointer to Next Object that is Active.
file | objectgetnoprotection.c
| Get Object without Dispatching Protection.
file | objectinitializeinformation.c
| Initialize Object Information.
file | objectnametoidstring.c
| Object ID to Name.
file | objectsetname.c
| Set Objects Name.

## Data Structures
union | Objects_Name
struct | Objects_Control
struct | Objects_Information
| The information structure used to manage each API class of objects. More...

## Macros
#define | OBJECTS_INDEX_START_BIT 0U
#define | OBJECTS_NODE_START_BIT 16U
#define | OBJECTS_API_START_BIT 24U
#define | OBJECTS_CLASS_START_BIT 27U
#define | OBJECTS_INDEX_MASK (Objects_Id)0x0000ffffU
#define | OBJECTS_NODE_MASK (Objects_Id)0x00ff0000U
#define | OBJECTS_API_MASK (Objects_Id)0x07000000U
#define | OBJECTS_CLASS_MASK (Objects_Id)0xf8000000U
#define | OBJECTS_INDEX_VALID_BITS (Objects_Id)0x0000ffffU
#define | OBJECTS_NODE_VALID_BITS (Objects_Id)0x000000ffU
#define | OBJECTS_API_VALID_BITS (Objects_Id)0x00000007U
#define | OBJECTS_CLASS_VALID_BITS (Objects_Id)0x0000001fU
#define | OBJECTS_UNLIMITED_OBJECTS 0x80000000U
#define | OBJECTS_ID_INITIAL_INDEX (0)
#define | OBJECTS_ID_FINAL_INDEX (0xffffU)
#define | OBJECTS_APIS_LAST OBJECTS_POSIX_API
#define | OBJECTS_ID_NONE 0
#define | OBJECTS_ID_OF_SELF ((Objects_Id) 0)
#define | OBJECTS_SEARCH_ALL_NODES 0
#define | OBJECTS_SEARCH_OTHER_NODES 0x7FFFFFFE
#define | OBJECTS_SEARCH_LOCAL_NODE 0x7FFFFFFF
#define | OBJECTS_WHO_AM_I 0
#define | OBJECTS_ID_INITIAL(_api, _class, _node) _Objects_Build_id( (_api), (_class), (_node), OBJECTS_ID_INITIAL_INDEX )
#define | OBJECTS_ID_FINAL ((Objects_Id)~0)
#define | _Objects_Build_name(_C1, _C2, _C3, _C4)
#define | _Objects_Build_id(the_api, the_class, node, index)
| Builds an object ID from its components.
#define | _Objects_Is_unlimited(maximum) ( ( ( maximum ) & OBJECTS_UNLIMITED_OBJECTS ) != 0 )
#define | _Objects_Maximum_per_allocation(maximum) ((Objects_Maximum) ((maximum) & ~OBJECTS_UNLIMITED_OBJECTS))
#define | _Objects_Local_node ((uint16_t) 1)
| The local MPCI node number.
#define | OBJECTS_NO_STRING_NAME 0
| Constant for the object information string name length to indicate that this object class has no string names.
#define | OBJECTS_INFORMATION_MP(name, extract)
#define | OBJECTS_INFORMATION_DEFINE_ZERO(name, api, cls, nl)
| Statically initializes an objects information.
#define | OBJECTS_INFORMATION_DEFINE(name, api, cls, type, max, nl, ex)
| Statically initializes an objects information.
#define | OBJECTS_INTERNAL_CLASSES_LAST OBJECTS_INTERNAL_THREADS
#define | OBJECTS_RTEMS_CLASSES_LAST OBJECTS_RTEMS_BARRIERS
#define | OBJECTS_POSIX_CLASSES_LAST OBJECTS_POSIX_SHMS
#define | _Objects_Maximum_nodes 1
#define | OBJECTS_INDEX_MINIMUM 1U
#define | OBJECTS_NAME_ERRORS_FIRST OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL
#define | OBJECTS_NAME_ERRORS_LAST OBJECTS_INVALID_NODE

## Typedefs
typedef uint32_t | Objects_Id
typedef uint16_t | Objects_Maximum
typedef struct Objects_Information | Objects_Information
typedef bool(* | Objects_Name_comparators) (void *, void *, uint16_t)

## Enumerations
enum | Objects_APIs { OBJECTS_NO_API = 0 , OBJECTS_INTERNAL_API = 1 , OBJECTS_CLASSIC_API = 2 , OBJECTS_POSIX_API = 3 , OBJECTS_FAKE_OBJECTS_API = 7 }
enum | Objects_Internal_API { OBJECTS_INTERNAL_NO_CLASS = 0 , OBJECTS_INTERNAL_THREADS = 1 }
enum | Objects_Classic_API { OBJECTS_CLASSIC_NO_CLASS = 0 , OBJECTS_RTEMS_TASKS = 1 , OBJECTS_RTEMS_TIMERS , OBJECTS_RTEMS_SEMAPHORES , OBJECTS_RTEMS_MESSAGE_QUEUES , OBJECTS_RTEMS_PARTITIONS , OBJECTS_RTEMS_REGIONS , OBJECTS_RTEMS_PORTS , OBJECTS_RTEMS_PERIODS , OBJECTS_RTEMS_EXTENSIONS , OBJECTS_RTEMS_BARRIERS }
enum | Objects_POSIX_API { OBJECTS_POSIX_NO_CLASS = 0 , OBJECTS_POSIX_THREADS = 1 , OBJECTS_POSIX_KEYS , OBJECTS_POSIX_MESSAGE_QUEUES , OBJECTS_POSIX_SEMAPHORES , OBJECTS_POSIX_TIMERS , OBJECTS_POSIX_SHMS }
enum | Objects_Fake_objects_API { OBJECTS_FAKE_OBJECTS_NO_CLASS = 0 , OBJECTS_FAKE_OBJECTS_SCHEDULERS = 1 }
enum | Objects_Name_or_id_lookup_errors { OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL , OBJECTS_INVALID_NAME , OBJECTS_INVALID_ADDRESS , OBJECTS_INVALID_ID , OBJECTS_INVALID_NODE }
enum | Objects_Get_by_name_error { OBJECTS_GET_BY_NAME_INVALID_NAME , OBJECTS_GET_BY_NAME_NAME_TOO_LONG , OBJECTS_GET_BY_NAME_NO_OBJECT }

## Functions
RTEMS_INLINE_ROUTINE Objects_APIs | _Objects_Get_API (Objects_Id id)
| Returns the API portion of the ID.
RTEMS_INLINE_ROUTINE uint32_t | _Objects_Get_class (Objects_Id id)
| Returns the class portion of the ID.
RTEMS_INLINE_ROUTINE uint32_t | _Objects_Get_node (Objects_Id id)
| Returns the node portion of the ID.
RTEMS_INLINE_ROUTINE Objects_Maximum | _Objects_Get_index (Objects_Id id)
| Returns the index portion of the ID.
Objects_Control * | _Objects_Allocate_none (Objects_Information *information)
| Always return NULL.
Objects_Control * | _Objects_Allocate_static (Objects_Information *information)
| Return an inactive object or NULL.
Objects_Control * | _Objects_Allocate_unlimited (Objects_Information *information)
| Return an inactive object or NULL.
void | _Objects_Free_static (Objects_Information *information, Objects_Control *the_object)
| Free the object.
void | _Objects_Free_unlimited (Objects_Information *information, Objects_Control *the_object)
| Free the object.
Objects_Maximum | _Objects_Extend_information (Objects_Information *information)
| Extends an object class information record.
void | _Objects_Free_objects_block (Objects_Information *information, Objects_Maximum block)
| Free the objects block with the specified index.
void | _Objects_Shrink_information (Objects_Information *information)
| Shrinks an object class information record.
void | _Objects_Initialize_information (Objects_Information *information)
| Initializes the specified objects information.
unsigned int | _Objects_API_maximum_class (uint32_t api)
| Returns highest numeric value of a valid API for the specified API.
Objects_Control * | _Objects_Allocate (Objects_Information *information)
| Allocates an object.
Objects_Name_or_id_lookup_errors | _Objects_Name_to_id_u32 (Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id)
| Converts an object name to an Id.
Objects_Control * | _Objects_Get_by_name (const Objects_Information *information, const char *name, size_t *name_length_p, Objects_Get_by_name_error *error)
| Gets an object control block identified by its name.
Objects_Name_or_id_lookup_errors | _Objects_Id_to_name (Objects_Id id, Objects_Name *name)
| Returns the name associated with object id.
Objects_Control * | _Objects_Get (Objects_Id id, ISR_lock_Context *lock_context, const Objects_Information *information)
| Maps the specified object identifier to the associated local object control block.
Objects_Control * | _Objects_Get_no_protection (Objects_Id id, const Objects_Information *information)
| Maps object ids to object control blocks.
Objects_Control * | _Objects_Get_next (Objects_Id id, const Objects_Information *information, Objects_Id *next_id_p)
| Gets the next open object after the specified object identifier.
Objects_Information * | _Objects_Get_information (Objects_APIs the_api, uint16_t the_class)
| Gets object information.
Objects_Information * | _Objects_Get_information_id (Objects_Id id)
| Gets information of an object from an ID.
RTEMS_INLINE_ROUTINE bool | _Objects_Has_string_name (const Objects_Information *information)
| Returns if the object has a string name.
char * | _Objects_Get_name_as_string (Objects_Id id, size_t length, char *name)
| Gets object name in the form of a C string.
size_t | _Objects_Name_to_string (Objects_Name name, bool is_string, char *buffer, size_t buffer_size)
| Converts the specified object name to a text representation.
bool | _Objects_Set_name (const Objects_Information *information, Objects_Control *the_object, const char *name)
| Sets objects name.
RTEMS_INLINE_ROUTINE void | _Objects_Namespace_remove_u32 (const Objects_Information *information, Objects_Control *the_object)
| Removes object with a 32-bit integer name from its namespace.
void | _Objects_Namespace_remove_string (const Objects_Information *information, Objects_Control *the_object)
| Removes object with a string name from its namespace.
void | _Objects_Close (const Objects_Information *information, Objects_Control *the_object)
| Closes object.
Objects_Maximum | _Objects_Active_count (const Objects_Information *information)
| Returns the count of active objects.
RTEMS_INLINE_ROUTINE Objects_Maximum | _Objects_Extend_size (const Objects_Information *information)
| Returns the object's objects per block.
RTEMS_INLINE_ROUTINE bool | _Objects_Is_api_valid (uint32_t the_api)
| Checks if the api is valid.
RTEMS_INLINE_ROUTINE bool | _Objects_Is_local_node (uint32_t node)
| Checks if the node is of the local object.
RTEMS_INLINE_ROUTINE bool | _Objects_Is_local_id (Objects_Id id RTEMS_UNUSED)
| Checks if the id is of a local object.
RTEMS_INLINE_ROUTINE bool | _Objects_Are_ids_equal (Objects_Id left, Objects_Id right)
| Checks if two object IDs are equal.
RTEMS_INLINE_ROUTINE Objects_Id | _Objects_Get_minimum_id (Objects_Id id)
| Returns the identifier with the minimum index for the specified identifier.
RTEMS_INLINE_ROUTINE Objects_Maximum | _Objects_Get_maximum_index (const Objects_Information *information)
| Returns the maximum index of the specified object class.
RTEMS_INLINE_ROUTINE Objects_Control * | _Objects_Get_inactive (Objects_Information *information)
| Get an inactive object or NULL.
RTEMS_INLINE_ROUTINE Objects_Maximum | _Objects_Is_auto_extend (const Objects_Information *information)
| Checks if the automatic object extension (unlimited objects) is enabled.
RTEMS_INLINE_ROUTINE void | _Objects_Set_local_object (const Objects_Information *information, uint32_t index, Objects_Control *the_object)
| Sets the pointer to the local_table object referenced by the index.
RTEMS_INLINE_ROUTINE void | _Objects_Invalidate_Id (const Objects_Information *information, Objects_Control *the_object)
| Invalidates an object Id.
RTEMS_INLINE_ROUTINE void | _Objects_Open (Objects_Information *information, Objects_Control *the_object, Objects_Name name)
| Places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.
RTEMS_INLINE_ROUTINE void | _Objects_Open_u32 (const Objects_Information *information, Objects_Control *the_object, uint32_t name)
| Places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.
RTEMS_INLINE_ROUTINE void | _Objects_Open_string (const Objects_Information *information, Objects_Control *the_object, const char *name)
| Places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.
RTEMS_INLINE_ROUTINE void | _Objects_Allocator_lock (void)
| Locks the object allocator mutex.
RTEMS_INLINE_ROUTINE void | _Objects_Allocator_unlock (void)
| Unlocks the object allocator mutex.
RTEMS_INLINE_ROUTINE bool | _Objects_Allocator_is_owner (void)
| Checks if the allocator is the owner of the object allocator mutex.
RTEMS_INLINE_ROUTINE Objects_Control * | _Objects_Allocate_unprotected (Objects_Information *information)
| Allocates an object without locking the allocator mutex.
RTEMS_INLINE_ROUTINE void | _Objects_Free (Objects_Information *information, Objects_Control *the_object)
| Frees an object.
RTEMS_INLINE_ROUTINE bool | _Objects_Is_in_allocated_block (Objects_Maximum index, Objects_Maximum objects_per_block)
| Returns true, if the object associated with the zero-based index is contained in an allocated block of objects, otherwise false.
RTEMS_INLINE_ROUTINE void | _Objects_Activate_unlimited (Objects_Information *information, Objects_Control *the_object)
| Activate the object.
RTEMS_INLINE_ROUTINE Objects_Control * | _Objects_Allocate_with_extend (Objects_Information *information, void(*extend)(Objects_Information *))
| Allocate an object and extend the objects information on demand.

## Variables
Objects_Information **const | _Objects_Information_table [OBJECTS_APIS_LAST+1]

## Detailed Description

## Macro Definition Documentation

## ◆ _Objects_Build_id

#define _Objects_Build_id | ( |  | the_api,
|  |  | the_class,
|  |  | node,
|  |  | index
| ) |  |

Value:
( (Objects_Id) ( (Objects_Id) the_api << OBJECTS_API_START_BIT ) | \
( (Objects_Id) the_class << OBJECTS_CLASS_START_BIT ) | \
( (Objects_Id) node << OBJECTS_NODE_START_BIT ) | \
( (Objects_Id) index << OBJECTS_INDEX_START_BIT ) )
OBJECTS_NODE_START_BIT
#define OBJECTS_NODE_START_BIT
Definition: object.h:97
Objects_Id
uint32_t Objects_Id
Definition: object.h:80
OBJECTS_INDEX_START_BIT
#define OBJECTS_INDEX_START_BIT
Definition: object.h:92
OBJECTS_API_START_BIT
#define OBJECTS_API_START_BIT
Definition: object.h:103
OBJECTS_CLASS_START_BIT
#define OBJECTS_CLASS_START_BIT
Definition: object.h:109

Builds an object ID from its components.

Parameters

  the_api | The object API.
  the_class | The object API class.
  node | The object node.
  index | The object index.

Returns
  Returns the object ID constructed from the arguments.

## ◆ _Objects_Build_name

#define _Objects_Build_name | ( |  | _C1,
|  |  | _C2,
|  |  | _C3,
|  |  | _C4
| ) |  |

Value:
( (uint32_t)(_C1) << 24 | \
(uint32_t)(_C2) << 16 | \
(uint32_t)(_C3) << 8 | \
(uint32_t)(_C4) )

This macro is used to build a thirty-two bit style name from four characters. The most significant byte will be the character _C1.

Parameters

  [in] | _C1 | is the first character of the name
  [in] | _C2 | is the second character of the name
  [in] | _C3 | is the third character of the name
  [in] | _C4 | is the fourth character of the name

## ◆ _Objects_Is_unlimited

#define _Objects_Is_unlimited | ( |  | maximum | ) | ( ( ( maximum ) & OBJECTS_UNLIMITED_OBJECTS ) != 0 )

Returns if the object maximum specifies unlimited objects.

Parameters

  [in] | maximum | The object maximum specification.

Return values

  true | Unlimited objects are available.
  false | The object count is fixed.

## ◆ _Objects_Maximum_nodes

#define _Objects_Maximum_nodes 1

The following is referenced to the number of nodes in the system.

## ◆ OBJECTS_API_MASK

#define OBJECTS_API_MASK (Objects_Id)0x07000000U

This mask is used to extract the API portion of an object Id.

## ◆ OBJECTS_API_START_BIT

#define OBJECTS_API_START_BIT 24U

This is the bit position of the starting bit of the API portion of the object Id.

## ◆ OBJECTS_API_VALID_BITS

#define OBJECTS_API_VALID_BITS (Objects_Id)0x00000007U

This mask represents the bits that is used to ensure no extra bits are set after shifting to extract the API portion of an object Id.

## ◆ OBJECTS_APIS_LAST

#define OBJECTS_APIS_LAST OBJECTS_POSIX_API

This macro is used to generically specify the last API index.

## ◆ OBJECTS_CLASS_MASK

#define OBJECTS_CLASS_MASK (Objects_Id)0xf8000000U

This mask is used to extract the class portion of an object Id.

## ◆ OBJECTS_CLASS_START_BIT

#define OBJECTS_CLASS_START_BIT 27U

This is the bit position of the starting bit of the class portion of the object Id.

## ◆ OBJECTS_CLASS_VALID_BITS

#define OBJECTS_CLASS_VALID_BITS (Objects_Id)0x0000001fU

This mask represents the bits that is used to ensure no extra bits are set after shifting to extract the class portion of an object Id.

## ◆ OBJECTS_ID_FINAL

#define OBJECTS_ID_FINAL ((Objects_Id)~0)

This macro specifies the highest object ID value

## ◆ OBJECTS_ID_FINAL_INDEX

#define OBJECTS_ID_FINAL_INDEX (0xffffU)

This is the highest value for the index portion of an object Id.

## ◆ OBJECTS_ID_INITIAL

#define OBJECTS_ID_INITIAL | ( |  | _api,
|  |  | _class,
|  |  | _node
| ) |  | _Objects_Build_id( (_api), (_class), (_node), OBJECTS_ID_INITIAL_INDEX )

This macros calculates the lowest ID for the specified api, class, and node.

## ◆ OBJECTS_ID_INITIAL_INDEX

#define OBJECTS_ID_INITIAL_INDEX (0)

This is the lowest value for the index portion of an object Id.

## ◆ OBJECTS_ID_NONE

#define OBJECTS_ID_NONE 0

No object can have this ID.

## ◆ OBJECTS_ID_OF_SELF

#define OBJECTS_ID_OF_SELF ((Objects_Id) 0)

The following defines the constant which may be used to manipulate the calling task.

## ◆ OBJECTS_INDEX_MASK

#define OBJECTS_INDEX_MASK (Objects_Id)0x0000ffffU

This mask is used to extract the index portion of an object Id.

## ◆ OBJECTS_INDEX_MINIMUM

#define OBJECTS_INDEX_MINIMUM 1U

This is the minimum object ID index associated with an object.

## ◆ OBJECTS_INDEX_START_BIT

#define OBJECTS_INDEX_START_BIT 0U

This is the bit position of the starting bit of the index portion of the object Id.

## ◆ OBJECTS_INDEX_VALID_BITS

#define OBJECTS_INDEX_VALID_BITS (Objects_Id)0x0000ffffU

This mask represents the bits that is used to ensure no extra bits are set after shifting to extract the index portion of an object Id.

## ◆ OBJECTS_INFORMATION_DEFINE

#define OBJECTS_INFORMATION_DEFINE | ( |  | name,
|  |  | api,
|  |  | cls,
|  |  | type,
|  |  | max,
|  |  | nl,
|  |  | ex
| ) |  |

Value:
static Objects_Control * \
name##_Local_table[ _Objects_Maximum_per_allocation( max ) ]; \
static type name##_Objects[ _Objects_Maximum_per_allocation( max ) ]; \
Objects_Information name##_Information = { \
_Objects_Build_id( api, cls, 1, _Objects_Maximum_per_allocation( max ) ), \
name##_Local_table, \
_Objects_Is_unlimited( max ) ? \
_Objects_Allocate_unlimited : _Objects_Allocate_static, \
_Objects_Is_unlimited( max ) ? \
_Objects_Free_unlimited : _Objects_Free_static, \
0, \
_Objects_Is_unlimited( max ) ? _Objects_Maximum_per_allocation( max ) : 0, \
sizeof( type ), \
nl, \
CHAIN_INITIALIZER_EMPTY( name##_Information.Inactive ), \
NULL, \
NULL, \
&name##_Objects[ 0 ].Object \
OBJECTS_INFORMATION_MP( name##_Information, ex ) \
}
NULL
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77
CHAIN_INITIALIZER_EMPTY
#define CHAIN_INITIALIZER_EMPTY(name)
Chain initializer for an empty chain with designator name.
Definition: chainimpl.h:39
_Objects_Free_static
void _Objects_Free_static(Objects_Information *information, Objects_Control *the_object)
Free the object.
Definition: objectfreestatic.c:41
_Objects_Allocate_static
Objects_Control * _Objects_Allocate_static(Objects_Information *information)
Return an inactive object or NULL.
Definition: objectallocatestatic.c:41
_Objects_Allocate_unlimited
Objects_Control * _Objects_Allocate_unlimited(Objects_Information *information)
Return an inactive object or NULL.
Definition: objectallocateunlimited.c:46
_Objects_Free_unlimited
void _Objects_Free_unlimited(Objects_Information *information, Objects_Control *the_object)
Free the object.
Definition: objectfree.c:24
Objects_Control
Definition: objectdata.h:39
Objects_Information
The information structure used to manage each API class of objects.
Definition: objectdata.h:176

Statically initializes an objects information.

The initialized objects information references a table with statically allocated objects as specified by the object maximum parameter. These objects must be registered via a call to _Objects_Information().

Parameters

  name | The object class C designator namespace prefix, e.g. _Semaphore.
  api | The object API number, e.g. OBJECTS_CLASSIC_API.
  cls | The object class number, e.g. OBJECTS_RTEMS_SEMAPHORES.
  type | The object class type.
  max | The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag may be set).
  nl | The object name string length, use OBJECTS_NO_STRING_NAME for objects without a string name.
  ex | The optional object extraction method. Used only if multiprocessing (RTEMS_MULTIPROCESSING) is enabled.

## ◆ OBJECTS_INFORMATION_DEFINE_ZERO

#define OBJECTS_INFORMATION_DEFINE_ZERO | ( |  | name,
|  |  | api,
|  |  | cls,
|  |  | nl
| ) |  |

Value:
Objects_Information name##_Information = { \
_Objects_Build_id( api, cls, 1, 0 ), \
NULL, \
_Objects_Allocate_none, \
NULL, \
0, \
0, \
0, \
nl, \
CHAIN_INITIALIZER_EMPTY( name##_Information.Inactive ), \
NULL, \
NULL, \
NULL \
OBJECTS_INFORMATION_MP( name##_Information, NULL ) \
}
_Objects_Allocate_none
Objects_Control * _Objects_Allocate_none(Objects_Information *information)
Always return NULL.
Definition: objectallocatenone.c:40

Statically initializes an objects information.

The initialized objects information contains no objects.

Parameters

  name | The object class C designator namespace prefix, e.g. _Semaphore.
  api | The object API number, e.g. OBJECTS_CLASSIC_API.
  cls | The object class number, e.g. OBJECTS_RTEMS_SEMAPHORES.
  nl | The object name string length, use OBJECTS_NO_STRING_NAME for objects without a string name.

## ◆ OBJECTS_INTERNAL_CLASSES_LAST

#define OBJECTS_INTERNAL_CLASSES_LAST OBJECTS_INTERNAL_THREADS

This macro is used to generically specify the last API index.

## ◆ OBJECTS_NAME_ERRORS_FIRST

#define OBJECTS_NAME_ERRORS_FIRST OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL

This macro defines the first entry in the Objects_Name_or_id_lookup_errors enumerated list.

## ◆ OBJECTS_NAME_ERRORS_LAST

#define OBJECTS_NAME_ERRORS_LAST OBJECTS_INVALID_NODE

This macro defines the last entry in the Objects_Name_or_id_lookup_errors enumerated list.

## ◆ OBJECTS_NODE_MASK

#define OBJECTS_NODE_MASK (Objects_Id)0x00ff0000U

This mask is used to extract the node portion of an object Id.

## ◆ OBJECTS_NODE_START_BIT

#define OBJECTS_NODE_START_BIT 16U

This is the bit position of the starting bit of the node portion of the object Id.

## ◆ OBJECTS_NODE_VALID_BITS

#define OBJECTS_NODE_VALID_BITS (Objects_Id)0x000000ffU

This mask represents the bits that is used to ensure no extra bits are set after shifting to extract the node portion of an object Id.

## ◆ OBJECTS_POSIX_CLASSES_LAST

#define OBJECTS_POSIX_CLASSES_LAST OBJECTS_POSIX_SHMS

This macro is used to generically specify the last API index.

## ◆ OBJECTS_RTEMS_CLASSES_LAST

#define OBJECTS_RTEMS_CLASSES_LAST OBJECTS_RTEMS_BARRIERS

This macro is used to generically specify the last API index.

## ◆ OBJECTS_SEARCH_ALL_NODES

#define OBJECTS_SEARCH_ALL_NODES 0

The following constant is used to specify that a name to ID search should search through all nodes.

## ◆ OBJECTS_SEARCH_LOCAL_NODE

#define OBJECTS_SEARCH_LOCAL_NODE 0x7FFFFFFF

The following constant is used to specify that a name to ID search should search only on this node.

## ◆ OBJECTS_SEARCH_OTHER_NODES

#define OBJECTS_SEARCH_OTHER_NODES 0x7FFFFFFE

The following constant is used to specify that a name to ID search should search through all nodes except the current node.

## ◆ OBJECTS_UNLIMITED_OBJECTS

#define OBJECTS_UNLIMITED_OBJECTS 0x80000000U

Mask to enable unlimited objects. This is used in the configuration table when specifying the number of configured objects.

## ◆ OBJECTS_WHO_AM_I

#define OBJECTS_WHO_AM_I 0

The following constant is used to specify that a name to ID search is being asked for the ID of the currently executing task.

## Typedef Documentation

## ◆ Objects_Id

typedef uint32_t Objects_Id

The following type defines the control block used to manage object IDs. The format is as follows (0=LSB):

Bits 0 .. 15 = index (up to 65535 objects of a type) Bits 16 .. 23 = node (up to 255 nodes) Bits 24 .. 26 = API (up to 7 API classes) Bits 27 .. 31 = class (up to 31 object types per API)

## ◆ Objects_Maximum

typedef uint16_t Objects_Maximum

This type is used to store the maximum number of allowed objects of each type.

## ◆ Objects_Name_comparators

typedef bool(* Objects_Name_comparators) (void *, void *, uint16_t)

Functions which compare names are prototyped like this.

## Enumeration Type Documentation

## ◆ Objects_APIs

enum Objects_APIs

This enumerated type is used in the class field of the object ID.

## ◆ Objects_Classic_API

enum Objects_Classic_API

This enumerated type is used in the class field of the object ID for the RTEMS Classic API.

## ◆ Objects_Internal_API

enum Objects_Internal_API

This enumerated type is used in the class field of the object ID for RTEMS internal object classes.

## ◆ Objects_Name_or_id_lookup_errors

enum Objects_Name_or_id_lookup_errors

This function implements the common portion of the object identification directives. This directive returns the object id associated with name. If more than one object of this class is named name, then the object to which the id belongs is arbitrary. Node indicates the extent of the search for the id of the object named name. If the object class supports global objects, then the search can be limited to a particular node or allowed to encompass all nodes.

## ◆ Objects_POSIX_API

enum Objects_POSIX_API

This enumerated type is used in the class field of the object ID for the POSIX API.

## Function Documentation

## ◆ _Objects_Activate_unlimited()

RTEMS_INLINE_ROUTINE void _Objects_Activate_unlimited | ( | Objects_Information * | information,
|  | Objects_Control * | the_object
| ) |  |

Activate the object.

This function must be only used in case this objects information supports unlimited objects.

Parameters

  information | The object information block.
  the_object | The object to activate.

## ◆ _Objects_Active_count()

Objects_Maximum _Objects_Active_count | ( | const Objects_Information * | information | ) |

Returns the count of active objects.

Parameters

  information | The object information table.

Returns
  The count of active objects.

## ◆ _Objects_Allocate()

Objects_Control * _Objects_Allocate | ( | Objects_Information * | information | ) |

Allocates an object.

This function locks the object allocator mutex via _Objects_Allocator_lock(). The caller must later unlock the object allocator mutex via _Objects_Allocator_unlock(). The caller must unlock the mutex in any case, even if the allocation failed due to resource shortage.

A typical object allocation code looks like this:

rtems_status_code some_create( rtems_id *id )
{
rtems_status_code sc;
Some_Control *some;
// The object allocator mutex protects the executing thread from
// asynchronous thread restart and deletion.
some = (Some_Control *) _Objects_Allocate( &_Some_Information );
if ( some != NULL ) {
_Some_Initialize( some );
sc = RTEMS_SUCCESSFUL;
} else {
sc = RTEMS_TOO_MANY;
}
_Objects_Allocator_unlock();
return sc;
}
rtems_status_code
rtems_status_code
Classic API Status.
Definition: status.h:43
RTEMS_SUCCESSFUL
@ RTEMS_SUCCESSFUL
Definition: status.h:47
RTEMS_TOO_MANY
@ RTEMS_TOO_MANY
Definition: status.h:68
rtems_id
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:83
_Objects_Allocate
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:42
_Objects_Allocator_unlock
RTEMS_INLINE_ROUTINE void _Objects_Allocator_unlock(void)
Unlocks the object allocator mutex.
Definition: objectimpl.h:843

Parameters

  [in,out] | information | The object information block.

Return values

  object | The allocated object.
  NULL | No object available.

See also
  _Objects_Free().

## ◆ _Objects_Allocate_none()

Objects_Control * _Objects_Allocate_none | ( | Objects_Information * | information | ) |

Always return NULL.

Parameters

  information | The objects information.

Return values

  NULL | Always.

## ◆ _Objects_Allocate_static()

Objects_Control * _Objects_Allocate_static | ( | Objects_Information * | information | ) |

Return an inactive object or NULL.

Parameters

  information | The objects information.

Return values

  NULL | No inactive object is available.
  object | An inactive object.

## ◆ _Objects_Allocate_unlimited()

Objects_Control * _Objects_Allocate_unlimited | ( | Objects_Information * | information | ) |

Return an inactive object or NULL.

Try to extend the objects information if necessary.

Parameters

  information | The objects information.

Return values

  NULL | No inactive object is available.
  object | An inactive object.

## ◆ _Objects_Allocate_unprotected()

RTEMS_INLINE_ROUTINE Objects_Control * _Objects_Allocate_unprotected | ( | Objects_Information * | information | ) |

Allocates an object without locking the allocator mutex.

This function can be called in two contexts

- the executing thread is the owner of the object allocator mutex, or
- in case the system state is not up, e.g. during sequential system initialization.

Parameters

  [in,out] | information | The object information block.

Return values

  object | The allocated object.
  NULL | No object available.

See also
  _Objects_Allocate() and _Objects_Free().

## ◆ _Objects_Allocate_with_extend()

RTEMS_INLINE_ROUTINE Objects_Control * _Objects_Allocate_with_extend | ( | Objects_Information * | information,
|  | void(*)(Objects_Information *) | extend
| ) |  |

Allocate an object and extend the objects information on demand.

This function must be only used in case this objects information supports unlimited objects.

Parameters

  information | The object information block.
  extend | The object information extend handler.

## ◆ _Objects_Allocator_is_owner()

RTEMS_INLINE_ROUTINE bool _Objects_Allocator_is_owner | ( | void |  | ) |

Checks if the allocator is the owner of the object allocator mutex.

Return values

  true | The allocator is the owner of the object allocator mutex.
  false | The allocato is not the owner of the object allocator mutex.

## ◆ _Objects_Allocator_lock()

RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock | ( | void |  | ) |

Locks the object allocator mutex.

While holding the allocator mutex the executing thread is protected from asynchronous thread restart and deletion.

The usage of the object allocator mutex with the thread life protection makes it possible to allocate and free objects without thread dispatching disabled. The usage of a unified workspace and unlimited objects may lead to heap fragmentation. Thus the execution time of the _Objects_Allocate() function may increase during system run-time.

See also
  _Objects_Allocator_unlock() and _Objects_Allocate().

## ◆ _Objects_Allocator_unlock()

RTEMS_INLINE_ROUTINE void _Objects_Allocator_unlock | ( | void |  | ) |

Unlocks the object allocator mutex.

In case the mutex is fully unlocked, then this function restores the previous thread life protection state and thus may not return if the executing thread was restarted or deleted in the mean-time.

## ◆ _Objects_API_maximum_class()

unsigned int _Objects_API_maximum_class | ( | uint32_t | api | ) |

Returns highest numeric value of a valid API for the specified API.

This function returns the highest numeric value of a valid API for the specified api.

Parameters

  api | The API of interest.

Return values

  some_value | Positive integer on success.
  0 | The method failed.

## ◆ _Objects_Are_ids_equal()

RTEMS_INLINE_ROUTINE bool _Objects_Are_ids_equal | ( | Objects_Id | left,
|  | Objects_Id | right
| ) |  |

Checks if two object IDs are equal.

Parameters

  left | The Id on the left hand side of the comparison.
  right | The Id on the right hand side of the comparison.

Return values

  true | The specified object IDs are equal.
  false | The specified object IDs are not equal.

## ◆ _Objects_Close()

void _Objects_Close | ( | const Objects_Information * | information,
|  | Objects_Control * | the_object
| ) |  |

Closes object.

This function removes the_object control pointer and object name in the Local Pointer and Local Name Tables.

Parameters

  | information | Points to an Object Information Table.
  [out] | the_object | A pointer to an object.

## ◆ _Objects_Extend_information()

Objects_Maximum _Objects_Extend_information | ( | Objects_Information * | information | ) |

Extends an object class information record.

Parameters

  information | Points to an object class information block.

Return values

  0 | The extend operation failed.
  block | The block index of the new objects block.

## ◆ _Objects_Extend_size()

RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Extend_size | ( | const Objects_Information * | information | ) |

Returns the object's objects per block.

Parameters

  information | The object information table.

Returns
  The number of objects per block of information.

## ◆ _Objects_Free()

RTEMS_INLINE_ROUTINE void _Objects_Free | ( | Objects_Information * | information,
|  | Objects_Control * | the_object
| ) |  |

Frees an object.

Appends the object to the chain of inactive objects.

Parameters

  | information | The object information block.
  [out] | the_object | The object to free.

See also
  _Objects_Allocate().

A typical object deletion code looks like this:

rtems_status_code some_delete( rtems_id id )
{
Some_Control *some;
// The object allocator mutex protects the executing thread from
// asynchronous thread restart and deletion.
_Objects_Allocator_lock();
// Get the object under protection of the object allocator mutex.
some = (Semaphore_Control *)
_Objects_Get_no_protection( id, &_Some_Information );
if ( some == NULL ) {
_Objects_Allocator_unlock();
return RTEMS_INVALID_ID;
}
// After the object close an object get with this identifier will
// fail.
_Objects_Close( &_Some_Information, &some->Object );
_Some_Delete( some );
// Thread dispatching is enabled. The object free is only protected
// by the object allocator mutex.
_Objects_Free( &_Some_Information, &some->Object );
_Objects_Allocator_unlock();
return RTEMS_SUCCESSFUL;
}
RTEMS_INVALID_ID
@ RTEMS_INVALID_ID
Definition: status.h:63
_Objects_Free
RTEMS_INLINE_ROUTINE void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectimpl.h:930
_Objects_Allocator_lock
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:831
_Objects_Close
void _Objects_Close(const Objects_Information *information, Objects_Control *the_object)
Closes object.
Definition: objectclose.c:23
_Objects_Get_no_protection
Objects_Control * _Objects_Get_no_protection(Objects_Id id, const Objects_Information *information)
Maps object ids to object control blocks.
Definition: objectgetnoprotection.c:23
Semaphore_Control
Definition: semdata.h:40

## ◆ _Objects_Free_objects_block()

void _Objects_Free_objects_block | ( | Objects_Information * | information,
|  | Objects_Maximum | block
| ) |  |

Free the objects block with the specified index.

Parameters

  information | The objects information.
  block | The block index.

## ◆ _Objects_Free_static()

void _Objects_Free_static | ( | Objects_Information * | information,
|  | Objects_Control * | the_object
| ) |  |

Free the object.

Append the object to the inactive chain of the objects information.

Parameters

  information | The objects information.
  the_object | The object to free.

## ◆ _Objects_Free_unlimited()

void _Objects_Free_unlimited | ( | Objects_Information * | information,
|  | Objects_Control * | the_object
| ) |  |

Free the object.

Append the object to the inactive chain of the objects information and shrink the objects information if necessary.

Parameters

  information | The objects information.
  the_object | The object to free.

## ◆ _Objects_Get()

Objects_Control * _Objects_Get | ( | Objects_Id | id,
|  | ISR_lock_Context * | lock_context,
|  | const Objects_Information * | information
| ) |  |

Maps the specified object identifier to the associated local object control block.

In this function interrupts are disabled during the object lookup. In case an associated object exists, then interrupts remain disabled, otherwise the previous interrupt state is restored.

Parameters

  id | The object identifier. This is the first parameter since usual callers get the object identifier as the first parameter themself.
  lock_context | The interrupt lock context. This is the second parameter since usual callers get the interrupt lock context as the second parameter themself.
  information | The object class information block.

Return values

  pointer | The pointer to the associated object control block. Interrupts are now disabled and must be restored using the specified lock context via _ISR_lock_ISR_enable() or _ISR_lock_Release_and_ISR_enable().
  NULL | No associated object exists.

## ◆ _Objects_Get_API()

RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API | ( | Objects_Id | id | ) |

Returns the API portion of the ID.

Parameters

  id | The object Id to be processed.

Returns
  An object Id constructed from the arguments.

## ◆ _Objects_Get_by_name()

Objects_Control * _Objects_Get_by_name | ( | const Objects_Information * | information,
|  | const char * | name,
|  | size_t * | name_length_p,
|  | Objects_Get_by_name_error * | error
| ) |  |

Gets an object control block identified by its name.

The object information must use string names.

Parameters

  | information | The object information. Must not be NULL.
  | name | The object name.
  [out] | name_length_p | Optional parameter to return the name length.
  [out] | error | The error indication in case of failure. Must not be NULL.

Return values

  pointer | The first object according to object index associated with this name.
  NULL | No object exists for this name or invalid parameters.

## ◆ _Objects_Get_class()

RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class | ( | Objects_Id | id | ) |

Returns the class portion of the ID.

Parameters

  id | The object Id to be processed.

Returns
  The class portion of the ID.

## ◆ _Objects_Get_inactive()

RTEMS_INLINE_ROUTINE Objects_Control * _Objects_Get_inactive | ( | Objects_Information * | information | ) |

Get an inactive object or NULL.

Return values

  NULL | No inactive object is available.
  object | An inactive object.

## ◆ _Objects_Get_index()

RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index | ( | Objects_Id | id | ) |

Returns the index portion of the ID.

Parameters

  id | is the Id to be processed.

Returns
  Returns the index portion of the specified object ID.

## ◆ _Objects_Get_information()

Objects_Information * _Objects_Get_information | ( | Objects_APIs | the_api,
|  | uint16_t | the_class
| ) |  |

Gets object information.

This function returns the information structure given an API and Class. This can be done independent of the existence of any objects created by the API.

Parameters

  the_api | Indicates the API for the information we want
  the_class | Indicates the Class for the information we want

Return values

  pointer | Pointer to the Object Information Table for the class of objects which corresponds to this object ID.
  NULL | An error occured.

## ◆ _Objects_Get_information_id()

Objects_Information * _Objects_Get_information_id | ( | Objects_Id | id | ) |

Gets information of an object from an ID.

This function returns the information structure given an id of an object.

Parameters

  id | The object ID to get the information from.

Return values

  pointer | Pointer to the Object Information Table for the class of objects which corresponds to this object ID.
  NULL | An error occured.

## ◆ _Objects_Get_maximum_index()

RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_maximum_index | ( | const Objects_Information * | information | ) |

Returns the maximum index of the specified object class.

Parameters

  information | The object information.

Returns
  The maximum index of the specified object class.

## ◆ _Objects_Get_minimum_id()

RTEMS_INLINE_ROUTINE Objects_Id _Objects_Get_minimum_id | ( | Objects_Id | id | ) |

Returns the identifier with the minimum index for the specified identifier.

The specified identifier must have valid API, class and node fields.

Parameters

  id | The identifier to be processed.

Returns
  The corresponding ID with the minimum index.

## ◆ _Objects_Get_name_as_string()

char * _Objects_Get_name_as_string | ( | Objects_Id | id,
|  | size_t | length,
|  | char * | name
| ) |  |

Gets object name in the form of a C string.

This method gets the name of an object and returns its name in the form of a C string. It attempts to be careful about overflowing the user's string and about returning unprintable characters.

Parameters

  | id | The object to obtain the name of.
  | length | Indicates the length of the caller's buffer.
  [out] | name | A string which will be filled in.

Return values

a name The operation was succeeded and the string was correctly filled in.

Return values

  NULL | An error occured.

## ◆ _Objects_Get_next()

Objects_Control * _Objects_Get_next | ( | Objects_Id | id,
|  | const Objects_Information * | information,
|  | Objects_Id * | next_id_p
| ) |  |

Gets the next open object after the specified object identifier.

Locks the object allocator mutex in case a next object exists.

Parameters

  | id | The Id of the object whose name we are locating. This is the first parameter since usual callers get the object identifier as the first parameter themself.
  | information | Points to an object class information block.
  [in,out] | next_id_p | The Id of the next object we will look at.

Return values

  pointer | Pointer to the located object.
  NULL | An error occured.

## ◆ _Objects_Get_no_protection()

Objects_Control * _Objects_Get_no_protection | ( | Objects_Id | id,
|  | const Objects_Information * | information
| ) |  |

Maps object ids to object control blocks.

This function maps object ids to object control blocks. If id corresponds to a local object, then it returns the_object control pointer which maps to id and location is set to OBJECTS_LOCAL. If the object class supports global objects and the object id is global and resides on a remote node, then location is set to OBJECTS_REMOTE, and the_object is undefined. Otherwise, location is set to OBJECTS_ERROR and the_object is undefined.

Parameters

  id | The Id of the object whose name we are locating. This is the first parameter since usual callers get the object identifier as the first parameter themself.
  information | Points to an object class information block.

Return values

  pointer | The local object corresponding to the given id.
  NULL | The object to the given id was not found locally.

## ◆ _Objects_Get_node()

RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node | ( | Objects_Id | id | ) |

Returns the node portion of the ID.

Parameters

  id | The object Id to be processed.

Returns
  Returns the node portion of an object ID.

## ◆ _Objects_Has_string_name()

RTEMS_INLINE_ROUTINE bool _Objects_Has_string_name | ( | const Objects_Information * | information | ) |

Returns if the object has a string name.

Parameters

  information | The object information table.

Return values

  true | The object has a string name.
  false | The object does not have a string name.

## ◆ _Objects_Id_to_name()

Objects_Name_or_id_lookup_errors _Objects_Id_to_name | ( | Objects_Id | id,
|  | Objects_Name * | name
| ) |  |

Returns the name associated with object id.

This function implements the common portion of the object Id to name directives. This function returns the name associated with object id.

Parameters

  | id | is the Id of the object whose name we are locating.
  [out] | name | will contain the name of the object, if found.

Return values

  OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL | The operation succeeded. name contains the name of the object.
  OBJECTS_INVALID_ID | The id is invalid, the operation failed.

Note
  This function currently does not support string names.

## ◆ _Objects_Initialize_information()

void _Objects_Initialize_information | ( | Objects_Information * | information | ) |

Initializes the specified objects information.

The objects information must be statically pre-initialized with the OBJECTS_INFORMATION_DEFINE() macro before this function is called.

Parameters

  information | The object information to be initialized.

## ◆ _Objects_Invalidate_Id()

RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id | ( | const Objects_Information * | information,
|  | Objects_Control * | the_object
| ) |  |

Invalidates an object Id.

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

Parameters

  [in,out] | information | points to an Object Information Table.
  | the_object | 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.

## ◆ _Objects_Is_api_valid()

RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid | ( | uint32_t | the_api | ) |

Checks if the api is valid.

Parameters

  the_api | is the api portion of an object ID.

Return values

  true | The specified api value is valid.
  false | The specified api value is not valid.

## ◆ _Objects_Is_auto_extend()

RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Is_auto_extend | ( | const Objects_Information * | information | ) |

Checks if the automatic object extension (unlimited objects) is enabled.

Parameters

  information | The object information.

Return values

  true | The automatic object extension (unlimited objects) is enabled.
  false | The automatic object extension (unlimited objects) is not enabled.

## ◆ _Objects_Is_in_allocated_block()

RTEMS_INLINE_ROUTINE bool _Objects_Is_in_allocated_block | ( | Objects_Maximum | index,
|  | Objects_Maximum | objects_per_block
| ) |  |

Returns true, if the object associated with the zero-based index is contained in an allocated block of objects, otherwise false.

Parameters

  index | is the zero-based object index.
  objects_per_block | is the object count per block.

Return values

  true | The object associated with the zero-based index is in an allocated block of objects.
  false | Otherwise.

## ◆ _Objects_Is_local_id()

RTEMS_INLINE_ROUTINE bool _Objects_Is_local_id | ( | Objects_Id id | RTEMS_UNUSED | ) |

Checks if the id is of a local object.

Parameters

  id | The object ID.

Return values

  true | The specified object Id is local.
  false | The specified object Id is not local.

Note
  On a single processor configuration, this always returns true.

## ◆ _Objects_Is_local_node()

RTEMS_INLINE_ROUTINE bool _Objects_Is_local_node | ( | uint32_t | node | ) |

Checks if the node is of the local object.

Parameters

  node | The node number and corresponds to the node number portion of an object ID.

Return values

  true | The specified node is the local node.
  false | The specified node is not the local node.

## ◆ _Objects_Name_to_id_u32()

Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32 | ( | Objects_Information * | information,
|  | uint32_t | name,
|  | uint32_t | node,
|  | Objects_Id * | id
| ) |  |

Converts an object name to an Id.

This method converts an object name to an Id. It performs a look up using the object information block for this object class.

Parameters

  | information | points to an object class information block.
  | name | is the name of the object to find.
  | node | is the set of nodes to search.
  [out] | id | will contain the Id if the search is successful.

Return values

  OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL | The operations was successful id contains the ID.
  OBJECTS_INVALID_NAME | The name was invalid.
  OBJECTS_INVALID_ID | The id is not 0 before the operation.

## ◆ _Objects_Name_to_string()

size_t _Objects_Name_to_string | ( | Objects_Name | name,
|  | bool | is_string,
|  | char * | buffer,
|  | size_t | buffer_size
| ) |  |

Converts the specified object name to a text representation.

Non-printable characters according to isprint() are converted to '*'.

Parameters

  | name | The object name.
  | is_string | Indicates if the object name is a string or a four character array (32-bit unsigned integer).
  [out] | buffer | The string buffer for the text representation.
  | buffer_size | The buffer size in characters.

Returns
  The length of the text representation. May be greater than or equal to the buffer size if truncation occurred.

## ◆ _Objects_Namespace_remove_string()

void _Objects_Namespace_remove_string | ( | const Objects_Information * | information,
|  | Objects_Control * | the_object
| ) |  |

Removes object with a string name from its namespace.

Parameters

  | information | The corresponding object information table.
  [out] | the_object | The object the object to operate upon.

## ◆ _Objects_Namespace_remove_u32()

RTEMS_INLINE_ROUTINE void _Objects_Namespace_remove_u32 | ( | const Objects_Information * | information,
|  | Objects_Control * | the_object
| ) |  |

Removes object with a 32-bit integer name from its namespace.

Parameters

  | information | The corresponding object information table.
  [out] | the_object | The object to operate upon.

## ◆ _Objects_Open()

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

Places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.

This method uses Objects_Name for the object name.

Parameters

  [in,out] | information | Points to an Object Information Table.
  | the_object | Pointer to an object.
  | name | The name of the object to make accessible.

## ◆ _Objects_Open_string()

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

Places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.

This method uses a String for the object name.

Parameters

  [in,out] | information | Points to an Object Information Table.
  | the_object | Pointer to an object.
  | name | The name of the object to make accessible.

## ◆ _Objects_Open_u32()

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

Places the_object control pointer and object name in the Local Pointer and Local Name Tables, respectively.

This method uses uint32_t for the object name.

Parameters

  [in,out] | information | Points to an Object Information Table.
  | the_object | Pointer to an object.
  | name | The name of the object to make accessible.

## ◆ _Objects_Set_local_object()

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

Sets the pointer to the local_table object referenced by the index.

Parameters

  [in,out] | information | Points to an Object Information Table.
  | index | The index of the object the caller wants to access.
  | the_object | 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.

## ◆ _Objects_Set_name()

bool _Objects_Set_name | ( | const Objects_Information * | information,
|  | Objects_Control * | the_object,
|  | const char * | name
| ) |  |

Sets objects name.

This method sets the object name to either a copy of a string or up to the first four characters of the string based upon whether this object class uses strings for names.

Parameters

  | information | points to the object information structure
  [out] | the_object | is the object to operate upon
  | name | is a pointer to the name to use

Return values

  true | The operation succeeded.
  false | The operation failed.

## ◆ _Objects_Shrink_information()

void _Objects_Shrink_information | ( | Objects_Information * | information | ) |

Shrinks an object class information record.

This function shrinks an object class information record. The object's name and object space are released. The local_table etc block does not shrink. The InActive list needs to be scanned to find the objects are remove them.

Parameters

  information | Points to an object class information block.

## Variable Documentation

## ◆ _Objects_Information_table

Objects_Information** const _Objects_Information_table[OBJECTS_APIS_LAST+1]
| extern

The following is the list of information blocks per API for each object class. From the ID, we can go to one of these information blocks, and obtain a pointer to the appropriate object control block.