19 #ifndef _RTEMS_SCORE_OBJECTIMPL_H 20 #define _RTEMS_SCORE_OBJECTIMPL_H 25 #include <rtems/score/threaddispatch.h> 47 #define OBJECTS_INTERNAL_CLASSES_LAST OBJECTS_INTERNAL_THREADS 50 #define OBJECTS_RTEMS_CLASSES_LAST OBJECTS_RTEMS_BARRIERS 53 #define OBJECTS_POSIX_CLASSES_LAST OBJECTS_POSIX_SHMS 60 OBJECTS_FAKE_OBJECTS_NO_CLASS = 0,
61 OBJECTS_FAKE_OBJECTS_SCHEDULERS = 1
62 } Objects_Fake_objects_API;
67 #if defined(RTEMS_MULTIPROCESSING) 70 #define _Objects_Local_node ((uint16_t)1) 76 #if defined(RTEMS_MULTIPROCESSING) 79 #define _Objects_Maximum_nodes 1 85 #define OBJECTS_INDEX_MINIMUM 1U 260 OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL,
261 OBJECTS_INVALID_NAME,
262 OBJECTS_INVALID_ADDRESS,
271 #define OBJECTS_NAME_ERRORS_FIRST OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL 277 #define OBJECTS_NAME_ERRORS_LAST OBJECTS_INVALID_NODE 303 OBJECTS_GET_BY_NAME_INVALID_NAME,
304 OBJECTS_GET_BY_NAME_NAME_TOO_LONG,
305 OBJECTS_GET_BY_NAME_NO_OBJECT
306 } Objects_Get_by_name_error;
325 size_t *name_length_p,
326 Objects_Get_by_name_error *error
609 return ( node == _Objects_Local_node );
624 #
if defined(RTEMS_MULTIPROCESSING)
631 #if defined(RTEMS_MULTIPROCESSING) 653 return ( left == right );
752 _Assert( information !=
NULL );
753 _Assert( the_object !=
NULL );
776 _Assert( information !=
NULL );
777 _Assert( the_object !=
NULL );
779 the_object->
name = name;
802 _Assert( !_Objects_Has_string_name( information ) );
826 _Assert( _Objects_Has_string_name( information ) );
852 _RTEMS_Lock_allocator();
864 _RTEMS_Unlock_allocator();
869 return _RTEMS_Allocator_is_owner();
878 #if defined(RTEMS_MULTIPROCESSING) uint32_t name_u32
Definition: object.h:63
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
Objects_Name_or_id_lookup_errors
Definition: objectimpl.h:259
RTEMS_INLINE_ROUTINE bool _Objects_Is_local_node(uint32_t node)
Definition: objectimpl.h:605
Definition: objectdata.h:39
Objects_Control * _Objects_Allocate_unprotected(Objects_Information *information)
Allocates an object without locking the allocator mutex.
Definition: objectallocate.c:33
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:25
Objects_Control * _Objects_Get_next(Objects_Id id, const Objects_Information *information, Objects_Id *next_id_p)
Definition: objectgetnext.c:23
RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index(Objects_Id id)
Definition: object.h:291
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(uint32_t the_api)
Definition: objectimpl.h:586
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:89
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
bool _Objects_Set_name(const Objects_Information *information, Objects_Control *the_object, const char *name)
Set objects name.
Definition: objectsetname.c:26
#define RTEMS_UNUSED
Definition: basedefs.h:162
RTEMS_INLINE_ROUTINE void _Objects_Open_u32(const Objects_Information *information, Objects_Control *the_object, uint32_t name)
Definition: objectimpl.h:796
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_Open_string(const Objects_Information *information, Objects_Control *the_object, const char *name)
Definition: objectimpl.h:820
Objects_Control * _Objects_Get_no_protection(Objects_Id id, const Objects_Information *information)
Maps object ids to object control blocks.
Definition: objectgetnoprotection.c:23
RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Is_auto_extend(const Objects_Information *information)
Returns true if the automatic object extension (unlimited objects) is enabled, otherwise false...
Definition: objectimpl.h:695
#define OBJECTS_INDEX_START_BIT
Definition: object.h:87
RTEMS_INLINE_ROUTINE void _Objects_Set_local_object(const Objects_Information *information, uint32_t index, Objects_Control *the_object)
Definition: objectimpl.h:716
Object Handler Data Structures.
Objects_Name_or_id_lookup_errors _Objects_Id_to_name(Objects_Id id, Objects_Name *name)
Implements the common portion of the object Id to name directives.
Definition: objectidtoname.c:23
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:34
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 Objects_Maximum _Objects_Get_maximum_index(const Objects_Information *information)
Definition: objectimpl.h:679
#define OBJECTS_INDEX_MASK
Definition: object.h:109
RTEMS_INLINE_ROUTINE void _Objects_Open(Objects_Information *information, Objects_Control *the_object, Objects_Name name)
Definition: objectimpl.h:770
RTEMS_INLINE_ROUTINE bool _Objects_Is_local_id(Objects_Id id RTEMS_UNUSED)
Definition: objectimpl.h:623
RTEMS_INLINE_ROUTINE void _Objects_Allocator_unlock(void)
Unlocks the object allocator mutex.
Definition: objectimpl.h:862
void _Objects_Extend_information(Objects_Information *information)
Definition: objectextendinformation.c:42
#define _Objects_Maximum_nodes
Definition: objectimpl.h:79
Objects_Information **const _Objects_Information_table[OBJECTS_APIS_LAST+1]
Definition: exinit.c:53
void _Objects_Shrink_information(Objects_Information *information)
Shrink an object class information record.
Definition: objectshrinkinformation.c:25
const char * name_p
Definition: object.h:61
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
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: objectnamespaceremove.c:25
Objects_Maximum _Objects_Active_count(const Objects_Information *information)
Returns the count of active objects.
Definition: objectactivecount.c:23
uint16_t Objects_Maximum
Definition: object.h:81
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:850
#define OBJECTS_APIS_LAST
Definition: object.h:178
void _Objects_Close(const Objects_Information *information, Objects_Control *the_object)
Close object.
Definition: objectclose.c:23
RTEMS_INLINE_ROUTINE bool _Objects_Are_ids_equal(Objects_Id left, Objects_Id right)
Definition: objectimpl.h:648
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node(Objects_Id id)
Definition: object.h:277
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_Invalidate_Id(const Objects_Information *information, Objects_Control *the_object)
Definition: objectimpl.h:747
uint32_t Objects_Id
Definition: object.h:75
#define OBJECTS_INDEX_MINIMUM
Definition: objectimpl.h:85
bool(* Objects_Name_comparators)(void *, void *, uint16_t)
Definition: objectimpl.h:40
Objects_Information * _Objects_Get_information_id(Objects_Id id)
Get information of an object from an ID.
Definition: objectgetinfoid.c:24
#define _Objects_Local_node
Definition: objectimpl.h:70
Objects_APIs
Definition: object.h:169
unsigned int _Objects_API_maximum_class(uint32_t api)
Object API Maximum Class.
Definition: objectapimaximumclass.c:23
RTEMS_INLINE_ROUTINE Objects_Id _Objects_Get_minimum_id(Objects_Id id)
Definition: objectimpl.h:665
void _Objects_Initialize_information(Objects_Information *information)
Initializes the specified objects information.
Definition: objectinitializeinformation.c:28
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
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77
Data Associated with the Manipulation of Global RTEMS Objects.
Objects_Information * _Objects_Get_information(Objects_APIs the_api, uint16_t the_class)
Get object information.
Definition: objectgetinfo.c:23
Objects_Id id
Definition: objectdata.h:43