Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_timeout.c
Show First 20 Lines • Show All 1,090 Lines • ▼ Show 20 Lines | |||||
int | int | ||||
_callout_stop_safe(struct callout *c, int safe) | _callout_stop_safe(struct callout *c, int safe) | ||||
{ | { | ||||
struct callout_cpu *cc, *old_cc; | struct callout_cpu *cc, *old_cc; | ||||
struct lock_class *class; | struct lock_class *class; | ||||
int direct, sq_locked, use_lock; | int direct, sq_locked, use_lock; | ||||
if (safe) { | |||||
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, | |||||
"calling %s", __func__); | |||||
} | |||||
/* | /* | ||||
* Some old subsystems don't hold Giant while running a callout_stop(), | * Some old subsystems don't hold Giant while running a callout_stop(), | ||||
* so just discard this check for the moment. | * so just discard this check for the moment. | ||||
*/ | */ | ||||
if (!safe && c->c_lock != NULL) { | if (!safe && c->c_lock != NULL) { | ||||
if (c->c_lock == &Giant.lock_object) | if (c->c_lock == &Giant.lock_object) | ||||
use_lock = mtx_owned(&Giant); | use_lock = mtx_owned(&Giant); | ||||
else { | else { | ||||
▲ Show 20 Lines • Show All 369 Lines • Show Last 20 Lines |