summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_lock.c')
-rw-r--r--sys/kern/subr_lock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c
index 1c18f65..b040c7b 100644
--- a/sys/kern/subr_lock.c
+++ b/sys/kern/subr_lock.c
@@ -532,6 +532,9 @@ lock_profile_obtain_lock_success(struct lock_object *lo, int contested,
struct lock_profile_object *l;
int spin;
+ if (SCHEDULER_STOPPED())
+ return;
+
/* don't reset the timer when/if recursing */
if (!lock_prof_enable || (lo->lo_flags & LO_NOPROFILE))
return;
@@ -596,6 +599,8 @@ lock_profile_release_lock(struct lock_object *lo)
struct lpohead *head;
int spin;
+ if (SCHEDULER_STOPPED())
+ return;
if (lo->lo_flags & LO_NOPROFILE)
return;
spin = (LOCK_CLASS(lo)->lc_flags & LC_SPINLOCK) ? 1 : 0;
OpenPOWER on IntegriCloud