Index: conf/options.alpha =================================================================== RCS file: /home/ncvs/src/sys/conf/options.alpha,v retrieving revision 1.27 diff -u -r1.27 options.alpha --- conf/options.alpha 2000/12/05 09:10:50 1.27 +++ conf/options.alpha 2001/02/03 03:12:05 @@ -20,6 +20,7 @@ PPC_PROBE_CHIPSET opt_ppc.h PPC_DEBUG opt_ppc.h +PREEMPTION SHOW_BUSYBUFS PANIC_REBOOT_WAIT_TIME opt_panic.h Index: alpha/alpha/interrupt.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/interrupt.c,v retrieving revision 1.36 diff -u -r1.36 interrupt.c --- alpha/alpha/interrupt.c 2001/02/01 03:34:19 1.36 +++ alpha/alpha/interrupt.c 2001/02/03 03:12:05 @@ -34,6 +34,7 @@ */ #include "opt_ddb.h" +#include "opt_preemption.h" #include /* RCS ID & Copyright macro defns */ @@ -553,6 +554,8 @@ * is higher priority than their current thread, it gets run now. */ ithd->it_need = 1; +#ifdef PREEMPTION + /* Does not work on 4100 and PC164 */ if (i->disable) { CTR1(KTR_INTR, "alpha_dispatch_intr: disabling vector 0x%x", i->vector); @@ -579,6 +582,30 @@ need_resched(); } mtx_exit(&sched_lock, MTX_SPIN); +#else + mtx_enter(&sched_lock, MTX_SPIN); + if (ithd->it_proc->p_stat == SWAIT) { + /* not on the run queue and not running */ + CTR1(KTR_INTR, "alpha_dispatch_intr: setrunqueue %d", + ithd->it_proc->p_pid); + + alpha_mb(); /* XXX - ??? */ + ithd->it_proc->p_stat = SRUN; + setrunqueue(ithd->it_proc); + aston(); + } else { + CTR3(KTR_INTR, "alpha_dispatch_intr: %d: it_need %d, state %d", + ithd->it_proc->p_pid, ithd->it_need, ithd->it_proc->p_stat); + } + if (i->disable) { + CTR1(KTR_INTR, + "alpha_dispatch_intr: disabling vector 0x%x", i->vector); + i->disable(i->vector); + } + mtx_exit(&sched_lock, MTX_SPIN); + + need_resched(); +#endif } void