21 #ifndef _RTEMS_SCORE_OBJECTIMPL_H 22 #define _RTEMS_SCORE_OBJECTIMPL_H 51 #define OBJECTS_INTERNAL_CLASSES_LAST OBJECTS_INTERNAL_THREADS 54 #define OBJECTS_RTEMS_CLASSES_LAST OBJECTS_RTEMS_BARRIERS 57 #define OBJECTS_POSIX_CLASSES_LAST OBJECTS_POSIX_SHMS 64 OBJECTS_FAKE_OBJECTS_NO_CLASS = 0,
65 OBJECTS_FAKE_OBJECTS_SCHEDULERS = 1
66 } Objects_Fake_objects_API;
71 #if defined(RTEMS_MULTIPROCESSING) 74 #define _Objects_Maximum_nodes 1 80 #define OBJECTS_INDEX_MINIMUM 1U 204 OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL,
205 OBJECTS_INVALID_NAME,
206 OBJECTS_INVALID_ADDRESS,
215 #define OBJECTS_NAME_ERRORS_FIRST OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL 221 #define OBJECTS_NAME_ERRORS_LAST OBJECTS_INVALID_NODE 247 OBJECTS_GET_BY_NAME_INVALID_NAME,
248 OBJECTS_GET_BY_NAME_NAME_TOO_LONG,
249 OBJECTS_GET_BY_NAME_NO_OBJECT
250 } Objects_Get_by_name_error;
269 size_t *name_length_p,
270 Objects_Get_by_name_error *error
585 #
if defined(RTEMS_MULTIPROCESSING)
592 #if defined(RTEMS_MULTIPROCESSING) 613 return ( left == right );
756 the_object->
name = name;
833 _RTEMS_Lock_allocator();
845 _RTEMS_Unlock_allocator();
856 return _RTEMS_Allocator_is_owner();
883 return ( *information->
allocate )( information );
937 ( *information->
deallocate )( information, the_object );
962 if ( block > objects_per_block ) {
963 block /= objects_per_block;
990 if ( the_object ==
NULL ) {
991 ( *extend )( information );
995 if ( the_object !=
NULL ) {
1008 #if defined(RTEMS_MULTIPROCESSING) RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_maximum_index(const Objects_Information *information)
Returns the maximum index of the specified object class.
Definition: objectimpl.h:639
uint32_t name_u32
Definition: object.h:68
void _Objects_Shrink_information(Objects_Information *information)
Shrinks an object class information record.
Definition: objectshrinkinformation.c:77
#define OBJECTS_APIS_LAST
Definition: object.h:183
void _Objects_Free_objects_block(Objects_Information *information, Objects_Maximum block)
Free the objects block with the specified index.
Definition: objectshrinkinformation.c:25
RTEMS_INLINE_ROUTINE Objects_Control * _Objects_Allocate_unprotected(Objects_Information *information)
Allocates an object without locking the allocator mutex.
Definition: objectimpl.h:874
#define _Objects_Maximum_nodes
Definition: objectimpl.h:74
#define OBJECTS_INDEX_START_BIT
Definition: object.h:92
Definition: objectdata.h:39
RTEMS_INLINE_ROUTINE bool _Objects_Is_local_id(Objects_Id id RTEMS_UNUSED)
Checks if the id is of a local object.
Definition: objectimpl.h:584
Objects_Information * _Objects_Get_information(Objects_APIs the_api, uint16_t the_class)
Gets object information.
Definition: objectgetinfo.c:23
RTEMS_INLINE_ROUTINE bool _Objects_Has_string_name(const Objects_Information *information)
Returns if the object has a string name.
Definition: objectimpl.h:408
RTEMS_INLINE_ROUTINE bool _Objects_Are_ids_equal(Objects_Id left, Objects_Id right)
Checks if two object IDs are equal.
Definition: objectimpl.h:608
RTEMS_INLINE_ROUTINE Objects_Control * _Objects_Get_inactive(Objects_Information *information)
Get an inactive object or NULL.
Definition: objectimpl.h:652
Objects_Information **const _Objects_Information_table[OBJECTS_APIS_LAST+1]
void _Objects_Initialize_information(Objects_Information *information)
Initializes the specified objects information.
Definition: objectinitializeinformation.c:29
Objects_Name_or_id_lookup_errors
Definition: objectimpl.h:203
#define OBJECTS_INDEX_MINIMUM
Definition: objectimpl.h:80
RTEMS_INLINE_ROUTINE Objects_Id _Objects_Get_minimum_id(Objects_Id id)
Returns the identifier with the minimum index for the specified identifier.
Definition: objectimpl.h:625
uint16_t Objects_Maximum
Definition: object.h:86
Constants and Structures Related with Thread Dispatch.
Objects_Information * _Objects_Get_information_id(Objects_Id id)
Gets information of an object from an ID.
Definition: objectgetinfoid.c:24
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node(Objects_Id id)
Returns the node portion of the ID.
Definition: object.h:284
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.
Definition: objectgetnameasstring.c:36
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,...
Definition: objectimpl.h:747
#define RTEMS_UNUSED
Definition: basedefs.h:174
RTEMS_INLINE_ROUTINE void _Objects_Allocator_unlock(void)
Unlocks the object allocator mutex.
Definition: objectimpl.h:843
char * _Objects_Get_name_as_string(Objects_Id id, size_t length, char *name)
Gets object name in the form of a C string.
Definition: objectgetnameasstring.c:87
bool(* Objects_Name_comparators)(void *, void *, uint16_t)
Definition: objectimpl.h:44
Objects_Maximum _Objects_Extend_information(Objects_Information *information)
Extends an object class information record.
Definition: objectextendinformation.c:32
RTEMS_INLINE_ROUTINE bool _System_state_Is_up(System_state_Codes state)
Checks if the state is up.
Definition: sysstate.h:133
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:42
Object Handler Data Structures.
Information for the Assert Handler.
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.
Definition: objectnametoidstring.c:26
Objects_Maximum _Objects_Active_count(const Objects_Information *information)
Returns the count of active objects.
Definition: objectactivecount.c:23
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.
Definition: objectnametoid.c:23
RTEMS_INLINE_ROUTINE System_state_Codes _System_state_Get(void)
Gets the current system state.
Definition: sysstate.h:90
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,...
Definition: objectimpl.h:801
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(const Objects_Information *information, Objects_Control *the_object)
Invalidates an object Id.
Definition: objectimpl.h:722
RTEMS_INLINE_ROUTINE void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectimpl.h:930
bool _Objects_Set_name(const Objects_Information *information, Objects_Control *the_object, const char *name)
Sets objects name.
Definition: objectsetname.c:27
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(uint32_t the_api)
Checks if the api is valid.
Definition: objectimpl.h:549
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.
Definition: objectgetnext.c:24
const char * name_p
Definition: object.h:66
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,...
Definition: objectimpl.h:775
#define _Objects_Local_node
The local MPCI node number.
Definition: object.h:347
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.
Definition: objectimpl.h:482
RTEMS_INLINE_ROUTINE bool _Objects_Is_local_node(uint32_t node)
Checks if the node is of the local object.
Definition: objectimpl.h:567
Objects_APIs
Definition: object.h:174
#define OBJECTS_INDEX_MASK
Definition: object.h:114
System State Handler API.
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.
Definition: objectimpl.h:979
RTEMS_INLINE_ROUTINE bool _Objects_Allocator_is_owner(void)
Checks if the allocator is the owner of the object allocator mutex.
Definition: objectimpl.h:854
void _Objects_Namespace_remove_string(const Objects_Information *information, Objects_Control *the_object)
Removes object with a string name from its namespace.
Definition: objectnamespaceremove.c:25
uint32_t Objects_Id
Definition: object.h:80
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.
Definition: objectgetlocal.c:28
RTEMS_INLINE_ROUTINE void _Objects_Activate_unlimited(Objects_Information *information, Objects_Control *the_object)
Activate the object.
Definition: objectimpl.h:949
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
Objects_Name name
Definition: objectdata.h:45
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:831
RTEMS_INLINE_ROUTINE Chain_Node * _Chain_Get_unprotected(Chain_Control *the_chain)
Gets the first node (unprotected).
Definition: chainimpl.h:630
RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Extend_size(const Objects_Information *information)
Returns the object's objects per block.
Definition: objectimpl.h:534
RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Is_auto_extend(const Objects_Information *information)
Checks if the automatic object extension (unlimited objects) is enabled.
Definition: objectimpl.h:668
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.
Definition: objectimpl.h:689
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
void _Objects_Close(const Objects_Information *information, Objects_Control *the_object)
Closes object.
Definition: objectclose.c:23
Objects_Control * _Objects_Get_no_protection(Objects_Id id, const Objects_Information *information)
Maps object ids to object control blocks.
Definition: objectgetnoprotection.c:23
unsigned int _Objects_API_maximum_class(uint32_t api)
Returns highest numeric value of a valid API for the specified API.
Definition: objectapimaximumclass.c:23
RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index(Objects_Id id)
Returns the index portion of the ID.
Definition: object.h:298
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
Definition: assert.h:100
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77
Data Associated with the Manipulation of Global RTEMS Objects.
Objects_Id id
Definition: objectdata.h:43
Objects_Name_or_id_lookup_errors _Objects_Id_to_name(Objects_Id id, Objects_Name *name)
Returns the name associated with object id.
Definition: objectidtoname.c:23