Use _SMP_Unicast_action()

It is a bit more efficient.
This commit is contained in:
Sebastian Huber 2019-05-17 10:21:58 +02:00
parent a87e0f4f5c
commit b5f8d4831d
2 changed files with 2 additions and 8 deletions

View File

@ -41,12 +41,9 @@ typedef void (*smp_call_func_t)(void *arg);
static inline int static inline int
smp_call_function_single(int cpu, smp_call_func_t func, void *arg, int wait) smp_call_function_single(int cpu, smp_call_func_t func, void *arg, int wait)
{ {
cpu_set_t set;
(void)wait; (void)wait;
CPU_ZERO(&set); _SMP_Unicast_action((uint32_t)cpu, func, arg);
CPU_SET(cpu, &set);
_SMP_Multicast_action(sizeof(set), &set, func, arg);
return (0); return (0);
} }

View File

@ -278,10 +278,7 @@ epoch_block_handler_preempt(struct ck_epoch *g __unused,
#ifdef RTEMS_SMP #ifdef RTEMS_SMP
if (cpu_self_index != er->er_cpuid) { if (cpu_self_index != er->er_cpuid) {
Processor_mask targets; _SMP_Unicast_action(er->er_cpuid, epoch_register_mutex, &etm);
_Processor_mask_From_index(&targets, er->er_cpuid);
_SMP_Multicast_action(&targets, epoch_register_mutex, &etm);
} else { } else {
epoch_register_mutex(&etm); epoch_register_mutex(&etm);
} }