summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/object.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-28 13:51:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-28 14:00:19 +0200
commitf6efd0bf8a846658cd6aae78d8c5774b7999a816 (patch)
treed7daa44d97dfcedc89c3df37a2a61fd35bf7b68e /cpukit/score/include/rtems/score/object.h
parentscore: Move object MP content to public API (diff)
downloadrtems-f6efd0bf8a846658cd6aae78d8c5774b7999a816.tar.bz2
score: Move object content to public API
Diffstat (limited to '')
-rw-r--r--cpukit/score/include/rtems/score/object.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h
index b231039c6a..9cd50db084 100644
--- a/cpukit/score/include/rtems/score/object.h
+++ b/cpukit/score/include/rtems/score/object.h
@@ -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))
+
/**@}*/
/**@}*/
/**@}*/