summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline/rtems/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-04-11 15:04:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-04-11 15:24:39 +0200
commit5eb434e67ed31111eb90b92cf75248f2ff9d1086 (patch)
tree4e4493d101058953149da482fb8344cb240721a2 /cpukit/score/inline/rtems/score
parentnios2: New functions (diff)
downloadrtems-5eb434e67ed31111eb90b92cf75248f2ff9d1086.tar.bz2
score: New macros and functions
New macros o _Objects_Maximum_per_allocation(), o rtems_resource_is_unlimited(), and o rtems_resource_maximum_per_allocation(). New function o _Objects_Is_unlimited().
Diffstat (limited to 'cpukit/score/inline/rtems/score')
-rw-r--r--cpukit/score/inline/rtems/score/object.inl20
1 files changed, 20 insertions, 0 deletions
diff --git a/cpukit/score/inline/rtems/score/object.inl b/cpukit/score/inline/rtems/score/object.inl
index ac07e68235..6a4fe21037 100644
--- a/cpukit/score/inline/rtems/score/object.inl
+++ b/cpukit/score/inline/rtems/score/object.inl
@@ -352,5 +352,25 @@ 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))
+
#endif
/* end of include file */