summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-07-29 08:34:45 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-07-29 09:03:50 +0200
commit98a57511b687ce1365140481d0c8cf597b6a5d43 (patch)
tree6eda41949a0687730354da414aa01d3c070c1eaf /cpukit/score/src
parentscore: Split SMP multicast action module (diff)
downloadrtems-98a57511b687ce1365140481d0c8cf597b6a5d43.tar.bz2
score: Add _Per_CPU_Submit_job()
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/percpujobs.c9
-rw-r--r--cpukit/score/src/smpmulticastaction.c3
-rw-r--r--cpukit/score/src/smpunicastaction.c3
3 files changed, 10 insertions, 5 deletions
diff --git a/cpukit/score/src/percpujobs.c b/cpukit/score/src/percpujobs.c
index 4ce96dc738..5aa2f8eb8b 100644
--- a/cpukit/score/src/percpujobs.c
+++ b/cpukit/score/src/percpujobs.c
@@ -6,7 +6,8 @@
* @ingroup RTEMSScorePerCPU
*
* @brief This source file contains the implementation of _Per_CPU_Add_job(),
- * _Per_CPU_Perform_jobs(), and _Per_CPU_Wait_for_job().
+ * _Per_CPU_Perform_jobs(), _Per_CPU_Submit_job(), and
+ * _Per_CPU_Wait_for_job().
*/
/*
@@ -90,6 +91,12 @@ void _Per_CPU_Add_job( Per_CPU_Control *cpu, Per_CPU_Job *job )
_Per_CPU_Jobs_release_and_ISR_enable( cpu, &lock_context );
}
+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 );
+}
+
void _Per_CPU_Wait_for_job(
const Per_CPU_Control *cpu,
const Per_CPU_Job *job
diff --git a/cpukit/score/src/smpmulticastaction.c b/cpukit/score/src/smpmulticastaction.c
index 6b9e9a30db..b4068c23c9 100644
--- a/cpukit/score/src/smpmulticastaction.c
+++ b/cpukit/score/src/smpmulticastaction.c
@@ -63,8 +63,7 @@ static void _SMP_Issue_action_jobs(
job->context = &jobs->Context;
cpu = _Per_CPU_Get_by_index( cpu_index );
- _Per_CPU_Add_job( cpu, job );
- _SMP_Send_message( cpu_index, SMP_MESSAGE_PERFORM_JOBS );
+ _Per_CPU_Submit_job( cpu, job );
}
}
}
diff --git a/cpukit/score/src/smpunicastaction.c b/cpukit/score/src/smpunicastaction.c
index bc481eb4a4..fa5b5bb7c6 100644
--- a/cpukit/score/src/smpunicastaction.c
+++ b/cpukit/score/src/smpunicastaction.c
@@ -54,7 +54,6 @@ void _SMP_Unicast_action(
context.arg = arg;
job.context = &context;
cpu = _Per_CPU_Get_by_index( cpu_index );
- _Per_CPU_Add_job( cpu, &job );
- _SMP_Send_message( cpu_index, SMP_MESSAGE_PERFORM_JOBS );
+ _Per_CPU_Submit_job( cpu, &job );
_Per_CPU_Wait_for_job( cpu, &job );
}