Implement alpha_shared_intr_disestablish(). Simply removes the handler
fromthe list, allowing the caller to manipulate the sharing type, if appropriate.
This commit is contained in:
parent
f654e0188e
commit
528dab6808
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: shared_intr.c,v 1.5 1998/07/07 22:06:29 thorpej Exp $ */
|
||||
/* $NetBSD: shared_intr.c,v 1.6 1998/08/01 18:52:36 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Carnegie-Mellon University.
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: shared_intr.c,v 1.5 1998/07/07 22:06:29 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: shared_intr.c,v 1.6 1998/08/01 18:52:36 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -173,6 +173,7 @@ alpha_shared_intr_establish(intr, num, type, level, fn, arg, basename)
|
|||
ih->ih_fn = fn;
|
||||
ih->ih_arg = arg;
|
||||
ih->ih_level = level;
|
||||
ih->ih_num = num;
|
||||
|
||||
intr[num].intr_sharetype = type;
|
||||
TAILQ_INSERT_TAIL(&intr[num].intr_q, ih, ih_q);
|
||||
|
@ -180,6 +181,22 @@ alpha_shared_intr_establish(intr, num, type, level, fn, arg, basename)
|
|||
return (ih);
|
||||
}
|
||||
|
||||
void
|
||||
alpha_shared_intr_disestablish(intr, cookie, basename)
|
||||
struct alpha_shared_intr *intr;
|
||||
void *cookie;
|
||||
const char *basename;
|
||||
{
|
||||
struct alpha_shared_intrhand *ih = cookie;
|
||||
unsigned int num = ih->ih_num;
|
||||
|
||||
/*
|
||||
* Just remove it from the list and free the entry. We let
|
||||
* the caller deal with resetting the share type, if appropriate.
|
||||
*/
|
||||
TAILQ_REMOVE(&intr[num].intr_q, ih, ih_q);
|
||||
}
|
||||
|
||||
int
|
||||
alpha_shared_intr_get_sharetype(intr, num)
|
||||
struct alpha_shared_intr *intr;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.h,v 1.14 1998/07/18 21:27:26 is Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.15 1998/08/01 18:52:36 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -94,6 +94,7 @@ struct alpha_shared_intrhand {
|
|||
int (*ih_fn) __P((void *));
|
||||
void *ih_arg;
|
||||
int ih_level;
|
||||
unsigned int ih_num;
|
||||
};
|
||||
|
||||
struct alpha_shared_intr {
|
||||
|
@ -114,6 +115,8 @@ int alpha_shared_intr_dispatch __P((struct alpha_shared_intr *,
|
|||
unsigned int));
|
||||
void *alpha_shared_intr_establish __P((struct alpha_shared_intr *,
|
||||
unsigned int, int, int, int (*)(void *), void *, const char *));
|
||||
void alpha_shared_intr_disestablish __P((struct alpha_shared_intr *,
|
||||
void *, const char *));
|
||||
int alpha_shared_intr_get_sharetype __P((struct alpha_shared_intr *,
|
||||
unsigned int));
|
||||
int alpha_shared_intr_isactive __P((struct alpha_shared_intr *,
|
||||
|
|
Loading…
Reference in New Issue