summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/include/rtems/score/smpimpl.h9
-rw-r--r--cpukit/score/src/percpujobs.c2
-rw-r--r--cpukit/score/src/smp.c6
3 files changed, 8 insertions, 9 deletions
diff --git a/cpukit/include/rtems/score/smpimpl.h b/cpukit/include/rtems/score/smpimpl.h
index 6ead6aaa5d..7c3e777299 100644
--- a/cpukit/include/rtems/score/smpimpl.h
+++ b/cpukit/include/rtems/score/smpimpl.h
@@ -218,14 +218,15 @@ static inline long unsigned _SMP_Inter_processor_interrupt_handler(
bool _SMP_Should_start_processor( uint32_t cpu_index );
/**
- * @brief Sends an SMP message to a processor.
+ * @brief Sends the SMP message to the processor.
*
* The target processor may be the sending processor.
*
- * @param cpu_index The target processor of the message.
- * @param message The message to send.
+ * @param[in, out] cpu is the processor control of the target processor.
+ *
+ * @param message is the message to send.
*/
-void _SMP_Send_message( uint32_t cpu_index, unsigned long message );
+void _SMP_Send_message( Per_CPU_Control *cpu, unsigned long message );
typedef void ( *SMP_Action_handler )( void *arg );
diff --git a/cpukit/score/src/percpujobs.c b/cpukit/score/src/percpujobs.c
index 2e13fdf71f..f273f7d17d 100644
--- a/cpukit/score/src/percpujobs.c
+++ b/cpukit/score/src/percpujobs.c
@@ -96,7 +96,7 @@ void _Per_CPU_Add_job( Per_CPU_Control *cpu, Per_CPU_Job *job )
void _Per_CPU_Submit_job( Per_CPU_Control *cpu, Per_CPU_Job *job )
{
_Per_CPU_Add_job( cpu, job );
- _SMP_Send_message( _Per_CPU_Get_index( cpu ), SMP_MESSAGE_PERFORM_JOBS );
+ _SMP_Send_message( cpu, SMP_MESSAGE_PERFORM_JOBS );
}
void _Per_CPU_Wait_for_job(
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index e04ec13fd5..e98249be51 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -322,16 +322,14 @@ void _SMP_Try_to_process_message(
}
}
-void _SMP_Send_message( uint32_t cpu_index, unsigned long message )
+void _SMP_Send_message( Per_CPU_Control *cpu, unsigned long message )
{
- Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );
-
(void) _Atomic_Fetch_or_ulong(
&cpu->message, message,
ATOMIC_ORDER_RELEASE
);
if ( _Per_CPU_Get_state( cpu ) == PER_CPU_STATE_UP ) {
- _CPU_SMP_Send_interrupt( cpu_index );
+ _CPU_SMP_Send_interrupt( _Per_CPU_Get_index( cpu ) );
}
}