summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-11-18 00:21:00 +0000
committerjhb <jhb@FreeBSD.org>2000-11-18 00:21:00 +0000
commitabf0152035ca85562c4ad45c23616f1746d94d1f (patch)
tree43498bf53fb691776ba60e9879a5395995fc6b66
parentb45236a982927cb713ebe6a313f1ab3cd32e11f2 (diff)
downloadFreeBSD-src-abf0152035ca85562c4ad45c23616f1746d94d1f.zip
FreeBSD-src-abf0152035ca85562c4ad45c23616f1746d94d1f.tar.gz
Release sched_lock very briefly to give interrupts a chance to fire if we
are in softclock() for a long time. The old code already did an splx()/slphigh() pair here, I just missed adding in the equivalent mutex operations on sched_lock earlier.
-rw-r--r--sys/kern/kern_timeout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 831fbac..58619a7 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -107,8 +107,10 @@ softclock(void *dummy)
if (steps >= MAX_SOFTCLOCK_STEPS) {
nextsoftcheck = c;
/* Give interrupts a chance. */
+ mtx_exit(&sched_lock, MTX_SPIN);
splx(s);
s = splhigh();
+ mtx_enter(&sched_lock, MTX_SPIN);
c = nextsoftcheck;
steps = 0;
}
OpenPOWER on IntegriCloud