mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-22 23:55:34 +08:00
Use _SMP_Unicast_action()
It is a bit more efficient.
This commit is contained in:
parent
a87e0f4f5c
commit
b5f8d4831d
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user