* Use atomic op for usched_global_cpumask in the cpu init code. This
code is serialized anyway, I think, but it is best to be safe.
* Add cpu_ccfence() to ensure that the compiler does not reorder the
clearing of the mask in the cpusync code.
lwkt_gdinit(gd);
vm_map_entry_reserve_cpu_init(gd);
sleep_gdinit(gd);
- usched_global_cpumask |= CPUMASK(cpuid);
+ atomic_set_cpumask(&usched_global_cpumask, CPUMASK(cpuid));
}
mask = cs->cs_mack;
cpu_ccfence();
cs->cs_mack = 0;
+ cpu_ccfence();
if (cs->cs_func && (cs->cs_mask & gd->gd_cpumask))
cs->cs_func(cs->cs_data);
if (mask) {