diff options
Diffstat (limited to 'sys/arch/vax/include/intr.h')
-rw-r--r-- | sys/arch/vax/include/intr.h | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/sys/arch/vax/include/intr.h b/sys/arch/vax/include/intr.h index cc135ccf42f..a567d59f773 100644 --- a/sys/arch/vax/include/intr.h +++ b/sys/arch/vax/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.10 2009/03/15 19:40:40 miod Exp $ */ +/* $OpenBSD: intr.h,v 1.11 2009/03/20 18:39:30 miod Exp $ */ /* $NetBSD: intr.h,v 1.1 1998/08/18 23:55:00 matt Exp $ */ /* @@ -38,8 +38,10 @@ /* Interrupt Priority Levels are not mutually exclusive. */ #define IPL_NONE 0x00 -#define IPL_SOFTCLOCK 0x08 -#define IPL_SOFTNET 0x0c +#define IPL_SOFT 0x08 +#define IPL_SOFTCLOCK 0x09 +#define IPL_SOFTNET 0x0a +#define IPL_SOFTTTY 0x0b #define IPL_BIO 0x15 /* block I/O */ #define IPL_NET 0x15 /* network */ #define IPL_TTY 0x16 /* terminal */ @@ -121,4 +123,42 @@ void splassert_check(int, const char *); #define splsoftassert(wantipl) do { /* nothing */ } while (0) #endif +#define SI_SOFT 0 /* for IPL_SOFT */ +#define SI_SOFTCLOCK 1 /* for IPL_SOFTCLOCK */ +#define SI_SOFTNET 2 /* for IPL_SOFTNET */ +#define SI_SOFTTTY 3 /* for IPL_SOFTTTY */ + +#define SI_NQUEUES 4 + +#ifndef _LOCORE + +#include <machine/mutex.h> +#include <sys/queue.h> + +struct soft_intrhand { + TAILQ_ENTRY(soft_intrhand) sih_list; + void (*sih_func)(void *); + void *sih_arg; + struct soft_intrq *sih_siq; + int sih_pending; +}; + +struct soft_intrq { + TAILQ_HEAD(, soft_intrhand) siq_list; + int siq_si; + struct mutex siq_mtx; +}; + +void softintr_disestablish(void *); +void *softintr_establish(int, void (*)(void *), void *); +void softintr_init(void); +void softintr_schedule(void *); + +/* XXX For legacy software interrupts. */ +extern struct soft_intrhand *softnet_intrhand; + +#define setsoftnet() softintr_schedule(softnet_intrhand) + +#endif /* _LOCORE */ + #endif /* _VAX_INTR_H */ |