/* * Pause this cpu */ void cpu_pause(struct reg *regsp) { int s = splhigh(); cpuid_t cii = cpu_index(curcpu()); if (__predict_false(cold)) return; do { kcpuset_atomic_set(cpus_paused, cii); do { ; } while (kcpuset_isset(cpus_paused, cii)); kcpuset_atomic_set(cpus_resumed, cii); #if defined(DDB) if (ddb_running_on_this_cpu_p()) cpu_Debugger(); if (ddb_running_on_any_cpu_p()) continue; #endif } while (false); splx(s); }
/* * Pause this cpu */ void cpu_pause(struct reg *regsp) { int s = splhigh(); int index = cpu_index(curcpu()); for (;;) { CPUSET_ADD(cpus_paused, index); do { ; } while (CPUSET_HAS_P(cpus_paused, index)); CPUSET_ADD(cpus_resumed, index); #if defined(DDB) if (ddb_running_on_this_cpu_p()) cpu_Debugger(); if (ddb_running_on_any_cpu_p()) continue; #endif break; } splx(s); }