RTEMS CPU Kit with SuperCore  4.10.99.0
Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
rtems/score/object.h File Reference

Constants and Structures Associated with the Object Handler. More...

#include <rtems/score/chain.h>
#include <rtems/score/isr.h>
#include <rtems/score/object.inl>
#include <rtems/score/objectmp.h>
Include dependency graph for object.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  Objects_Name
 The following type defines the control block used to manage object names. More...
struct  Objects_Control
 The following defines the Object Control Block used to manage each object local to this node. More...
struct  Objects_Information
 The following defines the structure for the information used to manage each class of objects. More...

Defines

#define RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES
 This macro is defined when an API is enabled that requires the use of strings for object names.
#define OBJECTS_INDEX_START_BIT   0U
 This is the bit position of the starting bit of the index portion of the object Id.
#define OBJECTS_NODE_START_BIT   16U
 This is the bit position of the starting bit of the node portion of the object Id.
#define OBJECTS_API_START_BIT   24U
 This is the bit position of the starting bit of the API portion of the object Id.
#define OBJECTS_CLASS_START_BIT   27U
 This is the bit position of the starting bit of the class portion of the object Id.
#define OBJECTS_INDEX_MASK   (Objects_Id)0x0000ffffU
 This mask is used to extract the index portion of an object Id.
#define OBJECTS_NODE_MASK   (Objects_Id)0x00ff0000U
 This mask is used to extract the node portion of an object Id.
#define OBJECTS_API_MASK   (Objects_Id)0x07000000U
 This mask is used to extract the API portion of an object Id.
#define OBJECTS_CLASS_MASK   (Objects_Id)0xf8000000U
 This mask is used to extract the class portion of an object Id.
#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.
#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.
#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.
#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.
#define OBJECTS_UNLIMITED_OBJECTS   0x80000000U
 Mask to enable unlimited objects.
#define OBJECTS_ID_INITIAL_INDEX   (0)
 This is the lowest value for the index portion of an object Id.
#define OBJECTS_ID_FINAL_INDEX   (0xffffU)
 This is the highest value for the index portion of an object Id.
#define OBJECTS_APIS_LAST   OBJECTS_POSIX_API
 This macro is used to generically specify the last API index.
#define OBJECTS_INTERNAL_CLASSES_LAST   OBJECTS_INTERNAL_MUTEXES
 This macro is used to generically specify the last API index.
#define OBJECTS_RTEMS_CLASSES_LAST   OBJECTS_RTEMS_BARRIERS
 This macro is used to generically specify the last API index.
#define OBJECTS_POSIX_CLASSES_LAST   OBJECTS_POSIX_RWLOCKS
 This macro is used to generically specify the last API index.
#define OBJECTS_ID_NONE   0
 No object can have this ID.
#define OBJECTS_ID_OF_SELF   ((Objects_Id) 0)
 The following defines the constant which may be used with _Objects_Get to manipulate the calling task.
#define OBJECTS_SEARCH_ALL_NODES   0
 The following constant is used to specify that a name to ID search should search through all 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.
#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.
#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.
#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.
#define OBJECTS_ID_FINAL   ((Objects_Id)~0)
 This macro specifies the highest object ID value.
#define _Objects_Build_name(_C1, _C2, _C3, _C4)
 This macro is used to build a thirty-two bit style name from four characters.
#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.
#define OBJECTS_NAME_ERRORS_LAST   OBJECTS_INVALID_NODE
 This macro defines the last entry in the Objects_Name_or_id_lookup_errors enumerated list.

Typedefs

typedef bool(* Objects_Name_comparators )(void *, void *, uint16_t)
 Functions which compare names are prototyped like this.
typedef uint32_t Objects_Id
 The following type defines the control block used to manage object IDs.
typedef uint16_t Objects_Maximum
 This type is used to store the maximum number of allowed objects of each type.
typedef 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 (i.e.

Enumerations

enum  Objects_APIs { OBJECTS_NO_API = 0, OBJECTS_INTERNAL_API = 1, OBJECTS_CLASSIC_API = 2, OBJECTS_POSIX_API = 3 }
 This enumerated type is used in the class field of the object ID.
enum  Objects_Internal_API { OBJECTS_INTERNAL_NO_CLASS = 0, OBJECTS_INTERNAL_THREADS = 1, OBJECTS_INTERNAL_MUTEXES = 2 }
 This enumerated type is used in the class field of the object ID for RTEMS internal object classes.
enum  Objects_Classic_API {
  OBJECTS_CLASSIC_NO_CLASS = 0, OBJECTS_RTEMS_TASKS = 1, OBJECTS_RTEMS_TIMERS = 2, OBJECTS_RTEMS_SEMAPHORES = 3,
  OBJECTS_RTEMS_MESSAGE_QUEUES = 4, OBJECTS_RTEMS_PARTITIONS = 5, OBJECTS_RTEMS_REGIONS = 6, OBJECTS_RTEMS_PORTS = 7,
  OBJECTS_RTEMS_PERIODS = 8, OBJECTS_RTEMS_EXTENSIONS = 9, OBJECTS_RTEMS_BARRIERS = 10
}
 This enumerated type is used in the class field of the object ID for the RTEMS Classic API.
enum  Objects_POSIX_API {
  OBJECTS_POSIX_NO_CLASS = 0, OBJECTS_POSIX_THREADS = 1, OBJECTS_POSIX_KEYS = 2, OBJECTS_POSIX_INTERRUPTS = 3,
  OBJECTS_POSIX_MESSAGE_QUEUE_FDS = 4, OBJECTS_POSIX_MESSAGE_QUEUES = 5, OBJECTS_POSIX_MUTEXES = 6, OBJECTS_POSIX_SEMAPHORES = 7,
  OBJECTS_POSIX_CONDITION_VARIABLES = 8, OBJECTS_POSIX_TIMERS = 9, OBJECTS_POSIX_BARRIERS = 10, OBJECTS_POSIX_SPINLOCKS = 11,
  OBJECTS_POSIX_RWLOCKS = 12
}
 This enumerated type is used in the class field of the object ID for the POSIX API.
enum  Objects_Locations { OBJECTS_REMOTE = 2, OBJECTS_LOCAL = 0, OBJECTS_ERROR = 1 }
 This enumerated type lists the locations which may be returned by _Objects_Get. More...
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
}
 This function implements the common portion of the object identification directives. More...

Functions

void _Objects_Extend_information (Objects_Information *information)
 This function extends an object class information record.
void _Objects_Shrink_information (Objects_Information *information)
 Shrink an object class information record.
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, bool supports_global, Objects_Thread_queue_Extract_callout extract)
 Initialize object Information.
unsigned int _Objects_API_maximum_class (uint32_t api)
 Object API Maximum Class.
Objects_Control_Objects_Allocate (Objects_Information *information)
 Allocate an object.
void _Objects_Free (Objects_Information *information, Objects_Control *the_object)
 Free 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_Name_or_id_lookup_errors _Objects_Name_to_id_string (Objects_Information *information, const char *name, Objects_Id *id)
 Converts an object name to an Id.
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.
Objects_Control_Objects_Get (Objects_Information *information, Objects_Id id, Objects_Locations *location)
 Maps object ids to object control blocks.
Objects_Control_Objects_Get_isr_disable (Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level)
 Maps object ids to object control blocks.
Objects_Control_Objects_Get_no_protection (Objects_Information *information, Objects_Id id, Objects_Locations *location)
 Maps object ids to object control blocks.
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.
Objects_Information_Objects_Get_information (Objects_APIs the_api, uint16_t the_class)
 Get object information.
Objects_Information_Objects_Get_information_id (Objects_Id id)
 Get information of an object from an ID.
char * _Objects_Get_name_as_string (Objects_Id id, size_t length, char *name)
 Gets object name in the form of a C string.
bool _Objects_Set_name (Objects_Information *information, Objects_Control *the_object, const char *name)
 Set objects name.
void _Objects_Namespace_remove (Objects_Information *information, Objects_Control *the_object)
 Removes object from namespace.
void _Objects_Close (Objects_Information *information, Objects_Control *the_object)
 Close object.
Objects_Maximum _Objects_Active_count (const Objects_Information *information)
 Returns the count of active objects.

Variables

SCORE_EXTERN uint16_t _Objects_Local_node
 The following is referenced to the node number of the local node.
SCORE_EXTERN uint16_t _Objects_Maximum_nodes
 The following is referenced to the number of nodes in the system.
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.

Detailed Description

Constants and Structures Associated with the Object Handler.

This include file contains all the constants and structures associated with the Object Handler. This Handler provides mechanisms which can be used to initialize and manipulate all objects which have ids.


Define Documentation

#define RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES

This macro is defined when an API is enabled that requires the use of strings for object names.

Since the Classic API uses 32-bit unsigned integers and not strings, this allows us to disable this in the smallest RTEMS configuratinos.