[rtems-libbsd commit] Use _SMP_Unicast_action()
Sebastian Huber
sebh at rtems.org
Tue May 21 05:41:01 UTC 2019
Module: rtems-libbsd
Branch: 5-freebsd-12
Commit: b5f8d4831d66364b7391e3660560cb9bbecada2e
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=b5f8d4831d66364b7391e3660560cb9bbecada2e
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri May 17 10:21:58 2019 +0200
Use _SMP_Unicast_action()
It is a bit more efficient.
---
rtemsbsd/powerpc/include/linux/smp.h | 5 +----
rtemsbsd/rtems/rtems-kernel-epoch.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/rtemsbsd/powerpc/include/linux/smp.h b/rtemsbsd/powerpc/include/linux/smp.h
index bf8e60e..67d368f 100644
--- a/rtemsbsd/powerpc/include/linux/smp.h
+++ b/rtemsbsd/powerpc/include/linux/smp.h
@@ -41,12 +41,9 @@ typedef void (*smp_call_func_t)(void *arg);
static inline int
smp_call_function_single(int cpu, smp_call_func_t func, void *arg, int wait)
{
- cpu_set_t set;
(void)wait;
- CPU_ZERO(&set);
- CPU_SET(cpu, &set);
- _SMP_Multicast_action(sizeof(set), &set, func, arg);
+ _SMP_Unicast_action((uint32_t)cpu, func, arg);
return (0);
}
diff --git a/rtemsbsd/rtems/rtems-kernel-epoch.c b/rtemsbsd/rtems/rtems-kernel-epoch.c
index 229f265..48c0cf6 100644
--- a/rtemsbsd/rtems/rtems-kernel-epoch.c
+++ b/rtemsbsd/rtems/rtems-kernel-epoch.c
@@ -278,10 +278,7 @@ epoch_block_handler_preempt(struct ck_epoch *g __unused,
#ifdef RTEMS_SMP
if (cpu_self_index != er->er_cpuid) {
- Processor_mask targets;
-
- _Processor_mask_From_index(&targets, er->er_cpuid);
- _SMP_Multicast_action(&targets, epoch_register_mutex, &etm);
+ _SMP_Unicast_action(er->er_cpuid, epoch_register_mutex, &etm);
} else {
epoch_register_mutex(&etm);
}
More information about the vc
mailing list