summaryrefslogtreecommitdiff
path: root/sys/kern/kern_timeout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r--sys/kern/kern_timeout.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 8e6b183bb76f..de18fe0e0598 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -71,9 +71,6 @@ int callwheelsize, callwheelbits, callwheelmask;
struct callout_tailq *callwheel;
int softticks; /* Like ticks, but for softclock(). */
struct mtx callout_lock;
-#ifdef DIAGNOSTIC
-struct mtx dont_sleep_in_callout;
-#endif
static struct callout *nextsoftcheck; /* Next callout to be checked. */
@@ -159,9 +156,6 @@ kern_timeout_callwheel_init(void)
TAILQ_INIT(&callwheel[i]);
}
mtx_init(&callout_lock, "callout", NULL, MTX_SPIN | MTX_RECURSE);
-#ifdef DIAGNOSTIC
- mtx_init(&dont_sleep_in_callout, "dont_sleep_in_callout", NULL, MTX_DEF);
-#endif
mtx_init(&callout_wait_lock, "callout_wait_lock", NULL, MTX_DEF);
cv_init(&callout_wait, "callout_wait");
}
@@ -290,11 +284,11 @@ softclock(void *dummy)
}
#ifdef DIAGNOSTIC
binuptime(&bt1);
- mtx_lock(&dont_sleep_in_callout);
#endif
+ THREAD_NO_SLEEPING();
c_func(c_arg);
+ THREAD_SLEEPING_OK();
#ifdef DIAGNOSTIC
- mtx_unlock(&dont_sleep_in_callout);
binuptime(&bt2);
bintime_sub(&bt2, &bt1);
if (bt2.frac > maxdt) {