diff options
Diffstat (limited to 'sys/arch/alpha/dev/shared_intr.c')
-rw-r--r-- | sys/arch/alpha/dev/shared_intr.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/sys/arch/alpha/dev/shared_intr.c b/sys/arch/alpha/dev/shared_intr.c index 3bda076be0c..bc547ccd8bd 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.2 1997/11/10 15:53:08 niklas Exp $ */ +/* $OpenBSD: shared_intr.c,v 1.3 1998/06/29 05:32:50 downsj Exp $ */ /* $NetBSD: shared_intr.c,v 1.1 1996/11/17 02:03:08 cgd Exp $ */ /* @@ -115,6 +115,30 @@ alpha_shared_intr_dispatch(intr, num) return (handled); } +int +alpha_shared_intr_check(intr, num, type) + struct alpha_shared_intr *intr; + unsigned int num; + int type; +{ + if (intr[num].intr_sharetype == IST_UNUSABLE) + return (0); + + switch (intr[num].intr_sharetype) { + case IST_EDGE: + case IST_LEVEL: + if (type == intr[num].intr_sharetype) + break; + case IST_PULSE: + if ((type != IST_NONE) && (intr[num].intr_q.tqh_first != NULL)) + return (0); + case IST_NONE: + break; + } + + return (1); +} + void * alpha_shared_intr_establish(intr, num, type, level, fn, arg, basename) struct alpha_shared_intr *intr; |