summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-04-05 11:28:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-04-05 11:28:46 +0200
commit46f05b92b20bd5d38bb952f6aaad6a7783ce36c9 (patch)
treebaeecf308721459eb76970794b2935aab8a7affe /cpukit/score/include/rtems
parentspcache01: Instruction cache invalidate workaround (diff)
downloadrtems-46f05b92b20bd5d38bb952f6aaad6a7783ce36c9.tar.bz2
SMP: Simplify SMP multicast actions
Diffstat (limited to 'cpukit/score/include/rtems')
-rw-r--r--cpukit/score/include/rtems/score/processormask.h31
-rw-r--r--cpukit/score/include/rtems/score/smpimpl.h8
2 files changed, 34 insertions, 5 deletions
diff --git a/cpukit/score/include/rtems/score/processormask.h b/cpukit/score/include/rtems/score/processormask.h
index 5a78dd33c6..8ee869a895 100644
--- a/cpukit/score/include/rtems/score/processormask.h
+++ b/cpukit/score/include/rtems/score/processormask.h
@@ -62,6 +62,37 @@ extern "C" {
*/
typedef uint32_t Processor_mask[ PROCESSOR_MASK_FIELD_COUNT ];
+RTEMS_INLINE_ROUTINE void _Processor_mask_Zero( Processor_mask mask )
+{
+ size_t i;
+
+ for ( i = 0; i < PROCESSOR_MASK_FIELD_COUNT; ++i ) {
+ mask[ i ] = 0;
+ }
+}
+
+RTEMS_INLINE_ROUTINE bool _Processor_mask_Is_zero( const Processor_mask mask )
+{
+ size_t i;
+
+ for ( i = 0; i < PROCESSOR_MASK_FIELD_COUNT; ++i ) {
+ if ( mask[ i ] != 0 ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+RTEMS_INLINE_ROUTINE void _Processor_mask_Assign( Processor_mask dst, const Processor_mask src )
+{
+ size_t i;
+
+ for ( i = 0; i < PROCESSOR_MASK_FIELD_COUNT; ++i ) {
+ dst[ i ] = src[ i ];
+ }
+}
+
RTEMS_INLINE_ROUTINE void _Processor_mask_Set( Processor_mask mask, uint32_t index )
{
mask[ PROCESSOR_MASK_FIELD( index ) ] |= PROCESSOR_MASK_BIT( index );
diff --git a/cpukit/score/include/rtems/score/smpimpl.h b/cpukit/score/include/rtems/score/smpimpl.h
index 1651a5ecc6..f85251e8b0 100644
--- a/cpukit/score/include/rtems/score/smpimpl.h
+++ b/cpukit/score/include/rtems/score/smpimpl.h
@@ -237,14 +237,12 @@ void _SMP_Send_message_broadcast(
*
* The sending processor may be part of the set.
*
- * @param[in] setsize The size of the set of target processors of the message.
- * @param[in] cpus The set of target processors of the message.
+ * @param[in] targets The set of processors to send the message.
* @param[in] message The message.
*/
void _SMP_Send_message_multicast(
- const size_t setsize,
- const cpu_set_t *cpus,
- unsigned long message
+ const Processor_mask targets,
+ unsigned long message
);
typedef void ( *SMP_Action_handler )( void *arg );