mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-23 07:51:52 +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
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user