From 6c39df7e73356ac18201acf6fe36592a97d2677c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 29 Jul 2021 08:48:26 +0200 Subject: score: Change _SMP_Send_message() parameter type Use the processor control to specify the target processor since this is what the callers have available. --- testsuites/smptests/smpipi01/init.c | 10 ++++++++-- testsuites/smptests/smpmulticast01/init.c | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'testsuites') diff --git a/testsuites/smptests/smpipi01/init.c b/testsuites/smptests/smpipi01/init.c index e815911539..5f992f8de1 100644 --- a/testsuites/smptests/smpipi01/init.c +++ b/testsuites/smptests/smpipi01/init.c @@ -127,7 +127,10 @@ static void test_send_message_while_processing_a_message( barrier(ctx, bs); rtems_test_assert(ctx->counters[cpu_index].value == 1); - _SMP_Send_message(cpu_index, SMP_MESSAGE_PERFORM_JOBS); + _SMP_Send_message( + _Per_CPU_Get_by_index(cpu_index), + SMP_MESSAGE_PERFORM_JOBS + ); /* (B) */ barrier(ctx, bs); @@ -199,9 +202,12 @@ static void test_send_message_flood( } for (cpu_index = 0; cpu_index < cpu_count; ++cpu_index) { + Per_CPU_Control *cpu; Per_CPU_Control *cpu_self; uint32_t i; + cpu = _Per_CPU_Get_by_index(cpu_index); + cpu_self = _Thread_Dispatch_disable(); _SMP_Synchronize(); _Thread_Dispatch_enable(cpu_self); @@ -213,7 +219,7 @@ static void test_send_message_flood( } for (i = 0; i < 100000; ++i) { - _SMP_Send_message(cpu_index, SMP_MESSAGE_PERFORM_JOBS); + _SMP_Send_message(cpu, SMP_MESSAGE_PERFORM_JOBS); } for (i = 0; i < cpu_count; ++i) { diff --git a/testsuites/smptests/smpmulticast01/init.c b/testsuites/smptests/smpmulticast01/init.c index fbe6fb6abf..4163dd8370 100644 --- a/testsuites/smptests/smpmulticast01/init.c +++ b/testsuites/smptests/smpmulticast01/init.c @@ -466,7 +466,7 @@ T_TEST_CASE(JobOrder) } T_step(0); - _SMP_Send_message(_Per_CPU_Get_index(cpu_self), SMP_MESSAGE_PERFORM_JOBS); + _SMP_Send_message(cpu_self, SMP_MESSAGE_PERFORM_JOBS); _Thread_Dispatch_enable(cpu_self); } @@ -505,9 +505,9 @@ T_TEST_CASE(AddJobInJob) _Per_CPU_Add_job(cpu_self, &add_job_in_job_jobs[0]); T_step(0); - _SMP_Send_message(_Per_CPU_Get_index(cpu_self), SMP_MESSAGE_PERFORM_JOBS); + _SMP_Send_message(cpu_self, SMP_MESSAGE_PERFORM_JOBS); T_step(2); - _SMP_Send_message(_Per_CPU_Get_index(cpu_self), SMP_MESSAGE_PERFORM_JOBS); + _SMP_Send_message(cpu_self, SMP_MESSAGE_PERFORM_JOBS); _Thread_Dispatch_enable(cpu_self); } -- cgit v1.2.3