38#ifndef _RTEMS_SCORE_OBJECTIMPL_H
39#define _RTEMS_SCORE_OBJECTIMPL_H
69#define OBJECTS_INTERNAL_CLASSES_LAST OBJECTS_INTERNAL_THREADS
72#define OBJECTS_RTEMS_CLASSES_LAST OBJECTS_RTEMS_BARRIERS
75#define OBJECTS_POSIX_CLASSES_LAST OBJECTS_POSIX_SHMS
82 OBJECTS_FAKE_OBJECTS_NO_CLASS = 0,
83 OBJECTS_FAKE_OBJECTS_SCHEDULERS = 1
84} Objects_Fake_objects_API;
89#if defined(RTEMS_MULTIPROCESSING)
92#define _Objects_Maximum_nodes 1
98#define OBJECTS_INDEX_MINIMUM 1U
238 OBJECTS_GET_BY_NAME_INVALID_NAME,
239 OBJECTS_GET_BY_NAME_NAME_TOO_LONG,
240 OBJECTS_GET_BY_NAME_NO_OBJECT
241} Objects_Get_by_name_error;
260 size_t *name_length_p,
261 Objects_Get_by_name_error *error
399static inline bool _Objects_Has_string_name(
474static inline void _Objects_Namespace_remove_u32(
481 _Assert( !_Objects_Has_string_name( information ) );
543static inline bool _Objects_Is_api_valid(
559static inline bool _Objects_Is_local_node(
576static inline bool _Objects_Is_local_id(
577#
if defined(RTEMS_MULTIPROCESSING)
584#if defined(RTEMS_MULTIPROCESSING)
585 return _Objects_Is_local_node( _Objects_Get_node(
id) );
600static inline bool _Objects_Are_ids_equal(
605 return ( left == right );
619 id &= ~OBJECTS_INDEX_MASK;
635 return _Objects_Get_index( information->
maximum_id );
681static inline void _Objects_Set_local_object(
693 _Assert( index <= _Objects_Get_maximum_index( information ) );
714static inline void _Objects_Invalidate_Id(
719 _Assert( information != NULL );
722 _Objects_Set_local_object(
724 _Objects_Get_index( the_object->
id ),
747 _Assert( information != NULL );
748 _Assert( !_Objects_Has_string_name( information ) );
753 _Objects_Set_local_object(
755 _Objects_Get_index( the_object->
id ),
759 return the_object->
id;
772static inline void _Objects_Open_string(
778 _Assert( information != NULL );
779 _Assert( _Objects_Has_string_name( information ) );
784 _Objects_Set_local_object(
786 _Objects_Get_index( the_object->
id ),
805static inline void _Objects_Allocator_lock(
void )
807 _RTEMS_Lock_allocator();
817static inline void _Objects_Allocator_unlock(
void )
819 _RTEMS_Unlock_allocator();
828static inline bool _Objects_Allocator_is_owner(
void )
830 return _RTEMS_Allocator_is_owner();
853 _Objects_Allocator_is_owner()
854 || !_System_state_Is_up( _System_state_Get() )
857 return ( *information->
allocate )( information );
904static inline void _Objects_Free(
909 _Assert( _Objects_Allocator_is_owner() );
911 ( *information->
deallocate )( information, the_object );
925static inline bool _Objects_Is_in_allocated_block(
930 return index >= objects_per_block;
942static inline void _Objects_Activate_unlimited(
950 _Assert( _Objects_Is_auto_extend( information ) );
955 if ( _Objects_Is_in_allocated_block( index, objects_per_block ) ) {
958 block = index / objects_per_block;
981 _Assert( _Objects_Is_auto_extend( information ) );
983 the_object = _Objects_Get_inactive( information );
985 if ( the_object == NULL ) {
986 ( *extend )( information );
987 the_object = _Objects_Get_inactive( information );
990 if ( the_object != NULL ) {
991 _Objects_Activate_unlimited( information, the_object );
1010#if defined(RTEMS_MULTIPROCESSING)
This header file provides the interfaces of the API Mutex Handler.
This header file provides the interfaces of the Assert Handler.
#define RTEMS_UNUSED
Tells the compiler that the variable or function is deliberately unused.
Definition: basedefs.h:927
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG and static analysis runs.
Definition: assert.h:96
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:46
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:56
unsigned int _Objects_API_maximum_class(uint32_t api)
Returns highest numeric value of a valid API for the specified API.
Definition: objectapimaximumclass.c:44
void _Objects_Shrink_information(Objects_Information *information)
Shrinks an object class information record.
Definition: objectshrinkinformation.c:99
#define OBJECTS_APIS_LAST
Definition: object.h:204
Objects_APIs
Definition: object.h:195
Status_Control _Objects_Set_name(const Objects_Information *information, Objects_Control *the_object, const char *name)
Sets objects name.
Definition: objectsetname.c:47
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:43
Objects_Information **const _Objects_Information_table[OBJECTS_APIS_LAST+1]
Objects_Maximum _Objects_Active_count(const Objects_Information *information)
Returns the count of active objects.
Definition: objectactivecount.c:45
void _Objects_Close(const Objects_Information *information, Objects_Control *the_object)
Closes object.
Definition: objectclose.c:44
void _Objects_Free_objects_block(Objects_Information *information, Objects_Maximum block)
Free the objects block with the specified index.
Definition: objectshrinkinformation.c:47
uint32_t Objects_Id
Definition: object.h:101
bool(* Objects_Name_comparators)(void *, void *, uint16_t)
Definition: objectimpl.h:62
Objects_Control * _Objects_Get_no_protection(Objects_Id id, const Objects_Information *information)
Maps object ids to object control blocks.
Definition: objectgetnoprotection.c:44
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:43
#define OBJECTS_INDEX_START_BIT
Definition: object.h:113
Objects_Information * _Objects_Get_information_id(Objects_Id id)
Gets information of an object from an ID.
Definition: objectgetinfoid.c:44
#define OBJECTS_INDEX_MINIMUM
Definition: objectimpl.h:98
#define _Objects_Maximum_nodes
Definition: objectimpl.h:92
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:44
void _Objects_Initialize_information(Objects_Information *information)
Initializes the specified objects information.
Definition: objectinitializeinformation.c:47
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:45
Status_Control _Objects_Id_to_name(Objects_Id id, Objects_Name *name)
Returns the name associated with object id.
Definition: objectidtoname.c:44
uint16_t Objects_Maximum
Definition: object.h:107
Status_Control _Objects_Name_to_id_u32(uint32_t name, uint32_t node, Objects_Id *id, const Objects_Information *information)
Searches an object of the specified class with the specified name on the specified set of nodes.
Definition: objectnametoid.c:49
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:107
Objects_Information * _Objects_Get_information(Objects_APIs the_api, uint16_t the_class)
Gets object information.
Definition: objectgetinfo.c:44
void _Objects_Free_nothing(void *ptr)
This function does nothing.
Definition: objectfreenothing.c:43
Objects_Maximum _Objects_Extend_information(Objects_Information *information)
Extends an object class information record.
Definition: objectextendinformation.c:52
#define _Objects_Local_node
The local MPCI node number.
Definition: object.h:368
Status_Control
Status codes.
Definition: status.h:111
This header file provides the interfaces of the ISR Locks.
This header file provides data structures used by the implementation and the Application Configuratio...
This header file provides the interfaces of the Object Handler Multiprocessing (MP) Support.
This header file provides the interfaces of the Operation Status Support.
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:94
Definition: objectdata.h:61
Objects_Id id
Definition: objectdata.h:65
Objects_Name name
Definition: objectdata.h:67
This header file provides the interfaces of the System State Handler.
This header file provides the interfaces of the Thread Handler related to thread dispatching.
const char * name_p
Definition: object.h:87
uint32_t name_u32
Definition: object.h:89