mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-23 20:52:40 +08:00
score: Move object content to public API
This commit is contained in:
@@ -220,6 +220,9 @@ typedef enum {
|
||||
OBJECTS_POSIX_API = 3
|
||||
} Objects_APIs;
|
||||
|
||||
/** This macro is used to generically specify the last API index. */
|
||||
#define OBJECTS_APIS_LAST OBJECTS_POSIX_API
|
||||
|
||||
/**
|
||||
* The following defines the Object Control Block used to manage
|
||||
* each object local to this node.
|
||||
@@ -404,6 +407,26 @@ RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id(
|
||||
(( (Objects_Id) index ) << OBJECTS_INDEX_START_BIT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the object maximum specifies unlimited objects.
|
||||
*
|
||||
* @param[in] maximum The object maximum specification.
|
||||
*
|
||||
* @retval true Unlimited objects are available.
|
||||
* @retval false The object count is fixed.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _Objects_Is_unlimited( uint32_t maximum )
|
||||
{
|
||||
return (maximum & OBJECTS_UNLIMITED_OBJECTS) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* We cannot use an inline function for this since it may be evaluated at
|
||||
* compile time.
|
||||
*/
|
||||
#define _Objects_Maximum_per_allocation( maximum ) \
|
||||
((Objects_Maximum) ((maximum) & ~OBJECTS_UNLIMITED_OBJECTS))
|
||||
|
||||
/**@}*/
|
||||
/**@}*/
|
||||
/**@}*/
|
||||
|
||||
@@ -42,9 +42,6 @@ typedef bool (*Objects_Name_comparators)(
|
||||
uint16_t /* length */
|
||||
);
|
||||
|
||||
/** This macro is used to generically specify the last API index. */
|
||||
#define OBJECTS_APIS_LAST OBJECTS_POSIX_API
|
||||
|
||||
/**
|
||||
* This enumerated type is used in the class field of the object ID
|
||||
* for RTEMS internal object classes.
|
||||
@@ -853,26 +850,6 @@ RTEMS_INLINE_ROUTINE void _Objects_Open_string(
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the object maximum specifies unlimited objects.
|
||||
*
|
||||
* @param[in] maximum The object maximum specification.
|
||||
*
|
||||
* @retval true Unlimited objects are available.
|
||||
* @retval false The object count is fixed.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _Objects_Is_unlimited( uint32_t maximum )
|
||||
{
|
||||
return (maximum & OBJECTS_UNLIMITED_OBJECTS) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* We cannot use an inline function for this since it may be evaluated at
|
||||
* compile time.
|
||||
*/
|
||||
#define _Objects_Maximum_per_allocation( maximum ) \
|
||||
((Objects_Maximum) ((maximum) & ~OBJECTS_UNLIMITED_OBJECTS))
|
||||
|
||||
/**
|
||||
* @brief Puts back an object obtained with _Objects_Get().
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user