19 #ifndef _RTEMS_SCORE_OBJECTIMPL_H 20 #define _RTEMS_SCORE_OBJECTIMPL_H 51 OBJECTS_INTERNAL_NO_CLASS = 0,
52 OBJECTS_INTERNAL_THREADS = 1,
53 OBJECTS_INTERNAL_MUTEXES = 2
57 #define OBJECTS_INTERNAL_CLASSES_LAST OBJECTS_INTERNAL_MUTEXES 64 OBJECTS_CLASSIC_NO_CLASS = 0,
65 OBJECTS_RTEMS_TASKS = 1,
66 OBJECTS_RTEMS_TIMERS = 2,
67 OBJECTS_RTEMS_SEMAPHORES = 3,
68 OBJECTS_RTEMS_MESSAGE_QUEUES = 4,
69 OBJECTS_RTEMS_PARTITIONS = 5,
70 OBJECTS_RTEMS_REGIONS = 6,
71 OBJECTS_RTEMS_PORTS = 7,
72 OBJECTS_RTEMS_PERIODS = 8,
73 OBJECTS_RTEMS_EXTENSIONS = 9,
74 OBJECTS_RTEMS_BARRIERS = 10
78 #define OBJECTS_RTEMS_CLASSES_LAST OBJECTS_RTEMS_BARRIERS 85 OBJECTS_POSIX_NO_CLASS = 0,
86 OBJECTS_POSIX_THREADS = 1,
87 OBJECTS_POSIX_KEYS = 2,
88 OBJECTS_POSIX_INTERRUPTS = 3,
89 OBJECTS_POSIX_MESSAGE_QUEUE_FDS = 4,
90 OBJECTS_POSIX_MESSAGE_QUEUES = 5,
91 OBJECTS_POSIX_MUTEXES = 6,
92 OBJECTS_POSIX_SEMAPHORES = 7,
93 OBJECTS_POSIX_CONDITION_VARIABLES = 8,
94 OBJECTS_POSIX_TIMERS = 9,
95 OBJECTS_POSIX_BARRIERS = 10,
96 OBJECTS_POSIX_SPINLOCKS = 11,
97 OBJECTS_POSIX_RWLOCKS = 12
101 #define OBJECTS_POSIX_CLASSES_LAST OBJECTS_POSIX_RWLOCKS 108 OBJECTS_FAKE_OBJECTS_NO_CLASS = 0,
109 OBJECTS_FAKE_OBJECTS_SCHEDULERS = 1
110 } Objects_Fake_objects_API;
118 #if defined(RTEMS_MULTIPROCESSING) 163 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) 169 #if defined(RTEMS_MULTIPROCESSING) 180 #if defined(RTEMS_MULTIPROCESSING) 183 #define _Objects_Local_node ((uint16_t)1) 189 #if defined(RTEMS_MULTIPROCESSING) 192 #define _Objects_Maximum_nodes 1 254 uint32_t maximum_name_length
255 #
if defined(RTEMS_MULTIPROCESSING)
257 bool supports_global,
408 OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL,
409 OBJECTS_INVALID_NAME,
410 OBJECTS_INVALID_ADDRESS,
419 #define OBJECTS_NAME_ERRORS_FIRST OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL 425 #define OBJECTS_NAME_ERRORS_LAST OBJECTS_INVALID_NODE 450 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) 466 Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string(
752 return ( node == _Objects_Local_node );
767 #
if defined(RTEMS_MULTIPROCESSING)
774 #if defined(RTEMS_MULTIPROCESSING) 796 return ( left == right );
819 #if defined(RTEMS_DEBUG) 820 if ( index > information->
maximum )
851 #if defined(RTEMS_DEBUG) 852 if ( index > information->
maximum )
878 _Assert( information != NULL );
902 _Assert( information != NULL );
905 the_object->
name = name;
952 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) 954 the_object->
name.name_p = name;
1009 _RTEMS_Lock_allocator();
1021 _RTEMS_Unlock_allocator();
1030 #if defined(RTEMS_MULTIPROCESSING) Constants and Structures Associated with the Object Handler.
uint32_t name_u32
This is the actual 32-bit "raw" integer name.
Definition: object.h:74
void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectfree.c:25
Objects_Name_or_id_lookup_errors
This function implements the common portion of the object identification directives.
Definition: objectimpl.h:407
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.
Definition: objectimpl.h:748
The following defines the Object Control Block used to manage each object local to this node...
Definition: object.h:232
Objects_Control * _Objects_Allocate_unprotected(Objects_Information *information)
Allocates an object without locking the allocator mutex.
Definition: objectallocate.c:39
void(* Objects_Thread_queue_Extract_callout)(void *)
The following type defines the callout used when a local task is extracted from a remote thread queue...
Definition: objectimpl.h:130
RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index(Objects_Id id)
This function returns the index portion of the ID.
Definition: object.h:376
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(uint32_t the_api)
This function returns true if the api is valid.
Definition: objectimpl.h:729
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:101
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
This is used to manage a chain.
Definition: chain.h:83
Objects_Control * _Objects_Get_no_protection(Objects_Information *information, Objects_Id id, Objects_Locations *location)
Maps object ids to object control blocks.
Definition: objectgetnoprotection.c:23
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
Objects_Control * _Objects_Get(Objects_Information *information, Objects_Id id, Objects_Locations *location)
Maps object ids to object control blocks.
Definition: objectget.c:23
void _Thread_Enable_dispatch(void)
Enables thread dispatching and releases the Giant lock.
void _Objects_Close(Objects_Information *information, Objects_Control *the_object)
Close object.
Definition: objectclose.c:23
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 T...
Definition: objectimpl.h:896
void _Objects_Initialize_information(Objects_Information *information, Objects_APIs the_api, uint16_t the_class, uint32_t maximum, uint16_t size, bool is_string, uint32_t maximum_name_length)
Initialize object Information.
Definition: objectinitializeinformation.c:27
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 obj...
Definition: objectimpl.h:873
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 T...
Definition: objectimpl.h:922
SCORE_EXTERN Objects_Information ** _Objects_Information_table[OBJECTS_APIS_LAST+1]
The following is the list of information blocks per API for each object class.
Definition: objectimpl.h:201
RTEMS_INLINE_ROUTINE void _Objects_Allocator_unlock(void)
Unlocks the object allocator mutex.
Definition: objectimpl.h:1019
void _Objects_Extend_information(Objects_Information *information)
This function extends an object class information record.
Definition: objectextendinformation.c:42
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch(void)
Enables thread dispatching and releases the Giant lock.
Definition: threaddispatch.h:369
#define _Objects_Maximum_nodes
The following is referenced to the number of nodes in the system.
Definition: objectimpl.h:192
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
Definition: assert.h:83
void _Objects_Shrink_information(Objects_Information *information)
Shrink an object class information record.
Definition: objectshrinkinformation.c:26
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.
Definition: objectimpl.h:809
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:32
Objects_Maximum _Objects_Active_count(const Objects_Information *information)
Returns the count of active objects.
Definition: objectactivecount.c:24
Objects_Internal_API
This enumerated type is used in the class field of the object ID for RTEMS internal object classes...
Definition: objectimpl.h:50
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 T...
Definition: objectimpl.h:946
uint16_t Objects_Maximum
This type is used to store the maximum number of allowed objects of each type.
Definition: object.h:128
bool _Objects_Set_name(Objects_Information *information, Objects_Control *the_object, const char *name)
Set objects name.
Definition: objectsetname.c:26
Objects_Locations
This enumerated type lists the locations which may be returned by _Objects_Get.
Definition: objectimpl.h:117
RTEMS_INLINE_ROUTINE void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition: objectimpl.h:1007
RTEMS_INLINE_ROUTINE void _Objects_Put_without_thread_dispatch(Objects_Control *the_object)
Puts back an object obtained with _Objects_Get().
Definition: objectimpl.h:985
RTEMS_INLINE_ROUTINE void _Objects_Put(Objects_Control *the_object)
Puts back an object obtained with _Objects_Get().
Definition: objectimpl.h:970
#define OBJECTS_APIS_LAST
This macro is used to generically specify the last API index.
Definition: object.h:226
Objects_Control * _Objects_Get_next(Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p)
Like _Objects_Get, but is used to find "next" open object.
Definition: objectgetnext.c:49
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.
Definition: objectimpl.h:791
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node(Objects_Id id)
This function returns the node portion of the ID.
Definition: object.h:354
Objects_POSIX_API
This enumerated type is used in the class field of the object ID for the POSIX API.
Definition: objectimpl.h:84
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
Objects_Classic_API
This enumerated type is used in the class field of the object ID for the RTEMS Classic API...
Definition: objectimpl.h:63
Objects_Name name
This is the object's name.
Definition: object.h:238
RTEMS_INLINE_ROUTINE bool _Objects_Is_local_id(Objects_Id id)
This function returns true if the id is of a local object, and false otherwise.
Definition: objectimpl.h:766
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
The following type defines the control block used to manage object names.
Definition: object.h:68
#define SCORE_EXTERN
The following ensures that all data is declared in the space of the initialization routine for either...
Definition: basedefs.h:81
bool(* Objects_Name_comparators)(void *, void *, uint16_t)
Functions which compare names are prototyped like this.
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
The following is referenced to the node number of the local node.
Definition: objectimpl.h:183
Objects_APIs
This enumerated type is used in the class field of the object ID.
Definition: object.h:217
unsigned int _Objects_API_maximum_class(uint32_t api)
Object API Maximum Class.
Definition: objectapimaximumclass.c:23
Objects_Control * _Objects_Get_isr_disable(Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_lock_Context *lock_context)
Maps object ids to object control blocks.
Definition: objectgetisr.c:23
void _Objects_Namespace_remove(Objects_Information *information, Objects_Control *the_object)
Removes object from namespace.
Definition: objectnamespaceremove.c:25
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 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. ...
Definition: objectimpl.h:840
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
This is the object's ID.
Definition: object.h:236