From 3c18738eebc3ab152ffb51145446e53abd3236d3 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 15 Jun 2006 20:08:30 +0000 Subject: Rework the interrupt code, shaving some cycles off in the process. Rather than an "iointr" routine that decomposes a vector into an IRQ, we maintain a vector table directly, hooking up each "iointr" routine at the correct vector. This also allows us to hook device interrupts up to specific vectors. From thorpej NetBSD Tested by myself and a number of end-users. --- sys/arch/alpha/dev/shared_intr.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sys/arch/alpha/dev') diff --git a/sys/arch/alpha/dev/shared_intr.c b/sys/arch/alpha/dev/shared_intr.c index 685e3e92f28..b5d8f8c9480 100644 --- a/sys/arch/alpha/dev/shared_intr.c +++ b/sys/arch/alpha/dev/shared_intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: shared_intr.c,v 1.14 2006/01/29 10:47:35 martin Exp $ */ +/* $OpenBSD: shared_intr.c,v 1.15 2006/06/15 20:08:29 brad Exp $ */ /* $NetBSD: shared_intr.c,v 1.13 2000/03/19 01:46:18 thorpej Exp $ */ /* @@ -215,6 +215,14 @@ alpha_shared_intr_isactive(intr, num) return (!TAILQ_EMPTY(&intr[num].intr_q)); } +int +alpha_shared_intr_firstactive(struct alpha_shared_intr *intr, unsigned int num) +{ + + return (!TAILQ_EMPTY(&intr[num].intr_q) && + TAILQ_NEXT(intr[num].intr_q.tqh_first, ih_q) == NULL); +} + void alpha_shared_intr_set_dfltsharetype(intr, num, newdfltsharetype) struct alpha_shared_intr *intr; -- cgit v1.2.3