diff options
author | jhb <jhb@FreeBSD.org> | 2001-02-21 22:51:00 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-02-21 22:51:00 +0000 |
commit | 4f27bdda0e23877d64a9c744b93b59a9c7d9c002 (patch) | |
tree | ba51a47c481ed4dc5e3b55bd8608eedd9cb6c55f | |
parent | 551dbec6e653d003c91db090deaa0b5ea2905ae4 (diff) | |
download | FreeBSD-src-4f27bdda0e23877d64a9c744b93b59a9c7d9c002.zip FreeBSD-src-4f27bdda0e23877d64a9c744b93b59a9c7d9c002.tar.gz |
Remove attempt to add in PREEMPTION #ifdef test in MI code that didn't
work because opt_preemption.h wasn't #include'd. Instead, make use of the
do_switch parameter to ithread_schedule() and do the check in the alpha
interrupt code.
-rw-r--r-- | sys/alpha/alpha/interrupt.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_intr.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c index 7c7c22b..e33f9d5 100644 --- a/sys/alpha/alpha/interrupt.c +++ b/sys/alpha/alpha/interrupt.c @@ -437,7 +437,11 @@ alpha_dispatch_intr(void *frame, unsigned long vector) "alpha_dispatch_intr: disabling vector 0x%x", i->vector); ithd->it_disable(ithd->it_vector); } +#ifdef PREEMPTION error = ithread_schedule(ithd, !cold); +#else + error = ithread_schedule(ithd, 0); +#endif KASSERT(error == 0, ("got an impossible stray interrupt")); } diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index e612d37..4463ac8 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -343,7 +343,6 @@ ithread_schedule(struct ithd *ithread, int do_switch) CTR1(KTR_INTR, __func__ ": setrunqueue %d", p->p_pid); p->p_stat = SRUN; setrunqueue(p); -#if !defined(__alpha__) || defined(PREEMPTION) if (do_switch) { saveintr = sched_lock.mtx_saveintr; mtx_intr_enable(&sched_lock); @@ -353,7 +352,6 @@ ithread_schedule(struct ithd *ithread, int do_switch) mi_switch(); sched_lock.mtx_saveintr = saveintr; } else -#endif need_resched(); } else { CTR3(KTR_INTR, __func__ ": pid %d: it_need %d, state %d", |