summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/smp.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-14 14:26:34 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-14 16:26:07 +0200
commitedde99bd213d20c55430dd29089e0d8a807ab6d8 (patch)
tree186fbfb97c296606a1584fd224777b3f6ed5f98e /cpukit/rtems/include/rtems/rtems/smp.h
parentscore: Add and use _Thread_Dispatch_if_necessary() (diff)
downloadrtems-edde99bd213d20c55430dd29089e0d8a807ab6d8.tar.bz2
score: Rename rtems_smp_get_number_of_processors()
Rename in rtems_smp_get_processor_count(). Always provide <rtems/score/smp.h> and <rtems/rtems/smp.h>. Add _SMP_Get_processor_count(). This function will be a compile time constant defined to be one on uni-processor configurations. This allows iterations over all processors without overhead on uni-processor configurations.
Diffstat (limited to 'cpukit/rtems/include/rtems/rtems/smp.h')
-rw-r--r--cpukit/rtems/include/rtems/rtems/smp.h46
1 files changed, 26 insertions, 20 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/smp.h b/cpukit/rtems/include/rtems/rtems/smp.h
index 1b0618ef4a..d8431b07f1 100644
--- a/cpukit/rtems/include/rtems/rtems/smp.h
+++ b/cpukit/rtems/include/rtems/rtems/smp.h
@@ -1,16 +1,13 @@
/**
- * @file rtems/rtems/smp.h
+ * @file
*
- * @defgroup ClassicSMP Classic API SMP Services
+ * @ingroup ClassicSMP
*
- * @ingroup ClassicRTEMS
- * @brief SMP information and services.
- *
- * Most of the SMP interface is hidden from the application
- * and exists between the BSP and RTEMS.
+ * @brief SMP Services API
*/
-/* COPYRIGHT (c) 1989-2011.
+/*
+ * COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -28,25 +25,34 @@ extern "C" {
#include <rtems/score/smp.h>
/**
- * @defgroup ClassicSMP Classic API SMP Services
+ * @defgroup ClassicSMP SMP Services
+ *
+ * @ingroup ClassicRTEMS
+ *
+ * This encapsulates functionality which is useful for SMP applications.
*
- * @ingroup ClassicRTEMS
+ * This API is also available on uni-processor configurations. Here compile
+ * time constants are used whenever possible.
*
- * This encapsulates functionality which is useful for SMP applications.
+ * @{
*/
-/**@{*/
/**
- * @brief Obtain Number of Cores in System
+ * @brief Returns the count of processors in the system.
+ *
+ * On uni-processor configurations this is a compile time constant and defined
+ * to be one.
*
- * This method returns the number of CPU cores that are currently in
- * the system. This will always be less than or equal to the number
- * of maximum number of cores which were configured.
+ * On SMP configurations this returns the value of a global variable set during
+ * system initialization to indicate the count of processors. The processor
+ * count depends on the hardware and application configuration. The value will
+ * always be less than or equal to the maximum count of application configured
+ * processors.
*
- * @retval This method returns the number of cores in this system.
+ * @return The count of processors in the system.
*/
-#define rtems_smp_get_number_of_processors() \
- (_SMP_Processor_count)
+#define rtems_smp_get_processor_count() \
+ _SMP_Get_processor_count()
/**
* @brief Obtain Current Core Number
@@ -58,7 +64,7 @@ extern "C" {
#define rtems_smp_get_current_processor() \
bsp_smp_processor_id()
-/**@}*/
+/** @} */
#ifdef __cplusplus
}