summaryrefslogtreecommitdiffstats
path: root/cpukit/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-12 06:37:01 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-13 08:22:58 +0100
commita00dff42cfdf201abe15829baeeb2b6341a0426b (patch)
treec155002e1d0b91337e2c60a237c114a998aa605f /cpukit/include
parentconfig: CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE (diff)
downloadrtems-a00dff42cfdf201abe15829baeeb2b6341a0426b.tar.bz2
rtems: Add and use rtems_object_get_local_node()
Update #3841.
Diffstat (limited to 'cpukit/include')
-rw-r--r--cpukit/include/rtems/rtems/object.h10
-rw-r--r--cpukit/include/rtems/score/object.h9
-rw-r--r--cpukit/include/rtems/score/objectimpl.h9
3 files changed, 19 insertions, 9 deletions
diff --git a/cpukit/include/rtems/rtems/object.h b/cpukit/include/rtems/rtems/object.h
index 3f70fc3f1c..d6ae058425 100644
--- a/cpukit/include/rtems/rtems/object.h
+++ b/cpukit/include/rtems/rtems/object.h
@@ -357,6 +357,16 @@ rtems_status_code rtems_object_get_class_information(
rtems_object_api_class_information *info
);
+/**
+ * @brief Get the local MPCI node number.
+ *
+ * @return The local MPCI node number.
+ */
+RTEMS_INLINE_ROUTINE uint16_t rtems_object_get_local_node( void )
+{
+ return _Objects_Local_node;
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/include/rtems/score/object.h b/cpukit/include/rtems/score/object.h
index 6f4bea95ae..6c39af6749 100644
--- a/cpukit/include/rtems/score/object.h
+++ b/cpukit/include/rtems/score/object.h
@@ -338,6 +338,15 @@ RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index(
#define _Objects_Maximum_per_allocation( maximum ) \
((Objects_Maximum) ((maximum) & ~OBJECTS_UNLIMITED_OBJECTS))
+/**
+ * @brief The local MPCI node number.
+ */
+#if defined(RTEMS_MULTIPROCESSING)
+extern uint16_t _Objects_Local_node;
+#else
+#define _Objects_Local_node ((uint16_t) 1)
+#endif
+
/** @} */
/** @} */
/** @} */
diff --git a/cpukit/include/rtems/score/objectimpl.h b/cpukit/include/rtems/score/objectimpl.h
index 8aca6b794b..9becb33e7d 100644
--- a/cpukit/include/rtems/score/objectimpl.h
+++ b/cpukit/include/rtems/score/objectimpl.h
@@ -64,15 +64,6 @@ typedef enum {
} Objects_Fake_objects_API;
/**
- * The following is referenced to the node number of the local node.
- */
-#if defined(RTEMS_MULTIPROCESSING)
-extern uint16_t _Objects_Local_node;
-#else
-#define _Objects_Local_node ((uint16_t)1)
-#endif
-
-/**
* The following is referenced to the number of nodes in the system.
*/
#if defined(RTEMS_MULTIPROCESSING)