diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1998-06-29 05:32:58 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1998-06-29 05:32:58 +0000 |
commit | d4c61825b8a47a2b5d7376e28809ece79a1746ef (patch) | |
tree | f35af3b84fcf9b572bbb9e129031db3644a32409 /sys/arch/alpha/dev/shared_intr.c | |
parent | a064358b7620366ced78ca694ebc5e2bfcf073cc (diff) |
isa_intr_check(), alpha style.
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; |