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