From 937122ae6dc02a639d13dd06132201548bd7364f Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 21 Jan 2001 19:25:07 +0000 Subject: Make intr_nesting_level per-process, rather than per-cpu. Setup interrupt threads to run with it always >= 1, so that malloc can detect M_WAITOK from "interrupt" context. This is also necessary in order to context switch from sched_ithd() directly. Reviewed By: peter --- sys/i386/isa/intr_machdep.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/i386/isa/intr_machdep.c') diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c index 00f5f23..b9328ae 100644 --- a/sys/i386/isa/intr_machdep.c +++ b/sys/i386/isa/intr_machdep.c @@ -577,6 +577,7 @@ inthand_add(const char *name, int irq, driver_intr_t handler, void *arg, if (errcode) panic("inthand_add: Can't create " "interrupt thread"); + p->p_intr_nesting_level = 1; p->p_rtprio.type = RTP_PRIO_ITHREAD; p->p_stat = SWAIT; /* we're idle */ -- cgit v1.1