summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_4bsd.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2004-09-06 07:23:14 +0000
committerjulian <julian@FreeBSD.org>2004-09-06 07:23:14 +0000
commit91180c0a8cec56a5b3f52158ed240314737edc1b (patch)
tree7a6dfdbbecf4fcd50504e13291480d0e22e426fe /sys/kern/sched_4bsd.c
parent90a7523335361d296e31fcafd85b8d9085619f1a (diff)
downloadFreeBSD-src-91180c0a8cec56a5b3f52158ed240314737edc1b.zip
FreeBSD-src-91180c0a8cec56a5b3f52158ed240314737edc1b.tar.gz
Don't do IPIs on behalf of interrupt threads.
just punt straight on through to teh preemption code. Make a KASSSERT out of a condition that can no longer occur. MFC after: 1 week
Diffstat (limited to 'sys/kern/sched_4bsd.c')
-rw-r--r--sys/kern/sched_4bsd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 62cde32..60b13ce 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -949,9 +949,10 @@ sched_add(struct thread *td, int flags)
* the thread is unpinned
* or pinned to another cpu,
* and there are other available and idle CPUs.
- * if we are idle, then skip straight to preemption.
+ * if we are idle, or it's an interrupt,
+ * then skip straight to preemption.
*/
- if ( (! idle) &&
+ if ( (! idle) && ((flags & SRQ_INTR) == 0) &&
(idle_cpus_mask & ~(hlt_cpus_mask | me)) &&
( KSE_CAN_MIGRATE(ke) ||
ke->ke_runq != &runq_pcpu[PCPU_GET(cpuid)])) {
OpenPOWER on IntegriCloud