xref: /minix3/minix/kernel/type.h (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc #ifndef TYPE_H
2*433d6423SLionel Sambuc #define TYPE_H
3*433d6423SLionel Sambuc 
4*433d6423SLionel Sambuc #include <minix/com.h>
5*433d6423SLionel Sambuc #include <machine/interrupt.h>
6*433d6423SLionel Sambuc #include <machine/multiboot.h>
7*433d6423SLionel Sambuc 
8*433d6423SLionel Sambuc /* Process table and system property related types. */
9*433d6423SLionel Sambuc typedef int proc_nr_t;			/* process table entry number */
10*433d6423SLionel Sambuc typedef short sys_id_t;			/* system process index */
11*433d6423SLionel Sambuc typedef struct {			/* bitmap for system indexes */
12*433d6423SLionel Sambuc   bitchunk_t chunk[BITMAP_CHUNKS(NR_SYS_PROCS)];
13*433d6423SLionel Sambuc } sys_map_t;
14*433d6423SLionel Sambuc 
15*433d6423SLionel Sambuc typedef unsigned long irq_policy_t;
16*433d6423SLionel Sambuc typedef unsigned long irq_id_t;
17*433d6423SLionel Sambuc 
18*433d6423SLionel Sambuc typedef struct irq_hook {
19*433d6423SLionel Sambuc   struct irq_hook *next;		/* next hook in chain */
20*433d6423SLionel Sambuc   int (*handler)(struct irq_hook *);	/* interrupt handler */
21*433d6423SLionel Sambuc   int irq;				/* IRQ vector number */
22*433d6423SLionel Sambuc   int id;				/* id of this hook */
23*433d6423SLionel Sambuc   endpoint_t proc_nr_e;			/* (endpoint) NONE if not in use */
24*433d6423SLionel Sambuc   irq_id_t notify_id;			/* id to return on interrupt */
25*433d6423SLionel Sambuc   irq_policy_t policy;			/* bit mask for policy */
26*433d6423SLionel Sambuc } irq_hook_t;
27*433d6423SLionel Sambuc 
28*433d6423SLionel Sambuc typedef int (*irq_handler_t)(struct irq_hook *);
29*433d6423SLionel Sambuc 
30*433d6423SLionel Sambuc #endif /* TYPE_H */
31