Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_kdb.c
Show First 20 Lines • Show All 701 Lines • ▼ Show 20 Lines | #endif | ||||
/* We reenter the debugger through kdb_reenter(). */ | /* We reenter the debugger through kdb_reenter(). */ | ||||
if (kdb_active) | if (kdb_active) | ||||
return (0); | return (0); | ||||
intr = intr_disable(); | intr = intr_disable(); | ||||
if (!SCHEDULER_STOPPED()) { | if (!SCHEDULER_STOPPED()) { | ||||
#ifdef SMP | #ifdef SMP | ||||
other_cpus = all_cpus; | CPU_ANDNOT(&other_cpus, &all_cpus, &stopped_cpus); | ||||
CPU_ANDNOT(&other_cpus, &stopped_cpus); | |||||
CPU_CLR(PCPU_GET(cpuid), &other_cpus); | CPU_CLR(PCPU_GET(cpuid), &other_cpus); | ||||
stop_cpus_hard(other_cpus); | stop_cpus_hard(other_cpus); | ||||
#endif | #endif | ||||
curthread->td_stopsched = 1; | curthread->td_stopsched = 1; | ||||
did_stop_cpus = 1; | did_stop_cpus = 1; | ||||
} else | } else | ||||
did_stop_cpus = 0; | did_stop_cpus = 0; | ||||
Show All 21 Lines | #endif | ||||
cnungrab(); | cnungrab(); | ||||
kdb_active--; | kdb_active--; | ||||
if (did_stop_cpus) { | if (did_stop_cpus) { | ||||
curthread->td_stopsched = 0; | curthread->td_stopsched = 0; | ||||
#ifdef SMP | #ifdef SMP | ||||
CPU_AND(&other_cpus, &stopped_cpus); | CPU_AND(&other_cpus, &other_cpus, &stopped_cpus); | ||||
restart_cpus(other_cpus); | restart_cpus(other_cpus); | ||||
#endif | #endif | ||||
} | } | ||||
intr_restore(intr); | intr_restore(intr); | ||||
return (handled); | return (handled); | ||||
} | } |