summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-18 06:47:01 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-05-20 08:49:39 +0200
commit658700449de9d67d8571b707eec50c06fdfb9455 (patch)
tree3c2c502dab87383f390f185ca7aeb920e0563b7d /cpukit
parentsmptests: Move SMP broadcast action test case (diff)
downloadrtems-658700449de9d67d8571b707eec50c06fdfb9455.tar.bz2
score: Add _SMP_Broadcast_action()
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/include/rtems/score/smpimpl.h24
-rw-r--r--cpukit/score/src/smpmulticastaction.c12
2 files changed, 28 insertions, 8 deletions
diff --git a/cpukit/include/rtems/score/smpimpl.h b/cpukit/include/rtems/score/smpimpl.h
index 6dde8f595d..bc24f828fe 100644
--- a/cpukit/include/rtems/score/smpimpl.h
+++ b/cpukit/include/rtems/score/smpimpl.h
@@ -253,12 +253,13 @@ void _SMP_Send_message_multicast(
typedef void ( *SMP_Action_handler )( void *arg );
/**
- * @brief Initiates an SMP multicast action to a set of target processors.
+ * @brief Initiates an SMP multicast action to the set of target processors.
*
- * The current processor may be part of the set.
+ * The current processor may be part of the set. In case a target processor is
+ * in a wrong state to process per-processor jobs, then this function results
+ * in an SMP_FATAL_WRONG_CPU_STATE_TO_PERFORM_JOBS fatal SMP error.
*
- * @param targets The set of target processors for the action. If @c NULL,
- * then the action will be performed on all online processors.
+ * @param targets The set of target processors for the action.
* @param handler The multicast action handler.
* @param arg The multicast action argument.
*/
@@ -268,6 +269,21 @@ void _SMP_Multicast_action(
void *arg
);
+/**
+ * @brief Initiates an SMP multicast action to the set of all online
+ * processors.
+ *
+ * Simply calls _SMP_Multicast_action() with _SMP_Get_online_processors() as
+ * the target processor set.
+ *
+ * @param handler The multicast action handler.
+ * @param arg The multicast action argument.
+ */
+void _SMP_Broadcast_action(
+ SMP_Action_handler handler,
+ void *arg
+);
+
#endif /* defined( RTEMS_SMP ) */
/**
diff --git a/cpukit/score/src/smpmulticastaction.c b/cpukit/score/src/smpmulticastaction.c
index ea430e8e7c..b703ba14a7 100644
--- a/cpukit/score/src/smpmulticastaction.c
+++ b/cpukit/score/src/smpmulticastaction.c
@@ -233,10 +233,6 @@ void _SMP_Multicast_action(
cpu_max = _SMP_Get_processor_maximum();
_Assert( cpu_max <= CPU_MAXIMUM_PROCESSORS );
- if ( targets == NULL ) {
- targets = _SMP_Get_online_processors();
- }
-
jobs.handler = handler;
jobs.arg = arg;
isr_level = _ISR_Get_level();
@@ -254,3 +250,11 @@ void _SMP_Multicast_action(
_Thread_Dispatch_enable( cpu_self );
}
}
+
+void _SMP_Broadcast_action(
+ SMP_Action_handler handler,
+ void *arg
+)
+{
+ _SMP_Multicast_action( _SMP_Get_online_processors(), handler, arg );
+}