summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-12-10 13:44:53 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-12-14 06:57:55 +0100
commit8b0e752fee90af946e0e117ca7d46a7df7814d14 (patch)
tree77a60415e91ce3a513e640b69044ab3628cbf6c0 /cpukit/include/rtems/score
parentpsxhdrs: Changed the Copyright license to BSD-2-Clause . (diff)
downloadrtems-8b0e752fee90af946e0e117ca7d46a7df7814d14.tar.bz2
score: Remove Objects_Information::auto_extend
Use Objects_Information::objects_per_block to provide this information. Add and use _Objects_Is_auto_extend(). Update #3621.
Diffstat (limited to 'cpukit/include/rtems/score')
-rw-r--r--cpukit/include/rtems/score/objectimpl.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/cpukit/include/rtems/score/objectimpl.h b/cpukit/include/rtems/score/objectimpl.h
index e32533c8f3..bbf32fcd80 100644
--- a/cpukit/include/rtems/score/objectimpl.h
+++ b/cpukit/include/rtems/score/objectimpl.h
@@ -126,7 +126,12 @@ typedef struct {
Objects_Control **local_table;
/** This is the number of objects on the Inactive list. */
Objects_Maximum inactive;
- /** This is the number of objects in a block. */
+ /**
+ * @brief This is the number of objects in a block if the automatic extension
+ * is enabled.
+ *
+ * This member is zero if the automatic extension is disabled.
+ */
Objects_Maximum objects_per_block;
/** This is the size in bytes of each object instance. */
uint16_t object_size;
@@ -137,8 +142,6 @@ typedef struct {
* (OBJECTS_NO_STRING_NAME).
*/
uint16_t name_length;
- /** This is the true if unlimited objects in this class. */
- bool auto_extend;
/** This is the chain of inactive control blocks. */
Chain_Control Inactive;
/** This is the number of inactive objects per block. */
@@ -747,7 +750,7 @@ RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Extend_size(
const Objects_Information *information
)
{
- return information->auto_extend ? information->objects_per_block : 0;
+ return information->objects_per_block;
}
/**
@@ -859,6 +862,22 @@ RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_maximum_index(
}
/**
+ * @brief Returns true if the automatic object extension (unlimited objects) is
+ * enabled, otherwise false.
+ *
+ * @param[in] information The object information.
+ *
+ * @retval true The automatic object extension (unlimited objects) is enabled.
+ * @retval false Otherwise.
+ */
+RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Is_auto_extend(
+ const Objects_Information *information
+)
+{
+ return information->objects_per_block != 0;
+}
+
+/**
* This function sets the pointer to the local_table object
* referenced by the index.
*