diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-22 19:14:51 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-14 07:03:29 +0100 |
commit | 21275b58a5a69c3c838082ffc8a7a3641f32ea9a (patch) | |
tree | d331e17c15d71f107d0f14581a93ddf768b05813 /cpukit/include/rtems/score/object.h | |
parent | rtems: Use object information to get config max (diff) | |
download | rtems-21275b58a5a69c3c838082ffc8a7a3641f32ea9a.tar.bz2 |
score: Static Objects_Information initialization
Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. Provide default object
informations with zero objects via librtemscpu.a. This greatly
simplifies the workspace size estimate. RTEMS applications which do not
use the unlimited objects option are easier to debug since all objects
reside now in statically allocated objects of the right types.
Close #3621.
Diffstat (limited to 'cpukit/include/rtems/score/object.h')
-rw-r--r-- | cpukit/include/rtems/score/object.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/cpukit/include/rtems/score/object.h b/cpukit/include/rtems/score/object.h index e7861ecab1..f75d1de2ab 100644 --- a/cpukit/include/rtems/score/object.h +++ b/cpukit/include/rtems/score/object.h @@ -307,18 +307,11 @@ RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index( * * @return This method returns an object Id constructed from the arguments. */ -RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id( - Objects_APIs the_api, - uint16_t the_class, - uint8_t node, - uint16_t index -) -{ - return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | - (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | - (( (Objects_Id) node ) << OBJECTS_NODE_START_BIT) | - (( (Objects_Id) index ) << OBJECTS_INDEX_START_BIT); -} +#define _Objects_Build_id( the_api, the_class, node, index ) \ + ( (Objects_Id) ( (Objects_Id) the_api << OBJECTS_API_START_BIT ) | \ + ( (Objects_Id) the_class << OBJECTS_CLASS_START_BIT ) | \ + ( (Objects_Id) node << OBJECTS_NODE_START_BIT ) | \ + ( (Objects_Id) index << OBJECTS_INDEX_START_BIT ) ) /** * Returns if the object maximum specifies unlimited objects. @@ -328,10 +321,8 @@ RTEMS_INLINE_ROUTINE Objects_Id _Objects_Build_id( * @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; -} +#define _Objects_Is_unlimited( maximum ) \ + ( ( ( maximum ) & OBJECTS_UNLIMITED_OBJECTS ) != 0 ) /* * We cannot use an inline function for this since it may be evaluated at |