Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_smp.c
| Show First 20 Lines • Show All 618 Lines • ▼ Show 20 Lines | smp_rendezvous_cpus(cpuset_t map, | ||||
| * CPUs. | * CPUs. | ||||
| */ | */ | ||||
| while (atomic_load_acq_int(&smp_rv_waiters[3]) < ncpus) | while (atomic_load_acq_int(&smp_rv_waiters[3]) < ncpus) | ||||
| cpu_spinwait(); | cpu_spinwait(); | ||||
| mtx_unlock_spin(&smp_ipi_mtx); | mtx_unlock_spin(&smp_ipi_mtx); | ||||
| } | } | ||||
markj: Extra newline | |||||
| void | |||||
| smp_rendezvous_cpu(uint32_t cpuid, | |||||
| void (* setup_func)(void *), | |||||
| void (* action_func)(void *), | |||||
| void (* teardown_func)(void *), | |||||
| void *arg) | |||||
Not Done Inline ActionsIndentation looks wrong here. This should really be added in a separate patch. markj: Indentation looks wrong here.
This should really be added in a separate patch. | |||||
Done Inline ActionsThis has been in a seperate commit. I will make another differnetial tomorrow. aokblast: This has been in a seperate commit. I will make another differnetial tomorrow. | |||||
| { | |||||
| cpuset_t set; | |||||
| CPU_SETOF(cpuid, &set); | |||||
| smp_rendezvous_cpus(set, setup_func, action_func, teardown_func, arg); | |||||
| } | |||||
| void | void | ||||
| smp_rendezvous(void (* setup_func)(void *), | smp_rendezvous(void (* setup_func)(void *), | ||||
| void (* action_func)(void *), | void (* action_func)(void *), | ||||
| void (* teardown_func)(void *), | void (* teardown_func)(void *), | ||||
| void *arg) | void *arg) | ||||
| { | { | ||||
| smp_rendezvous_cpus(all_cpus, setup_func, action_func, teardown_func, arg); | smp_rendezvous_cpus(all_cpus, setup_func, action_func, teardown_func, arg); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 725 Lines • Show Last 20 Lines | |||||
Extra newline