- simplify findhole() for use for 1 page only
[minix.git] / kernel / type.h
blobf09939737704b37ef98ce8d7af43237b51ecec4b
1 #ifndef TYPE_H
2 #define TYPE_H
4 #include <minix/com.h>
5 #include <ibm/interrupt.h>
7 typedef _PROTOTYPE( void task_t, (void) );
9 /* Process table and system property related types. */
10 typedef int proc_nr_t; /* process table entry number */
11 typedef short sys_id_t; /* system process index */
12 typedef struct { /* bitmap for system indexes */
13 bitchunk_t chunk[BITMAP_CHUNKS(NR_SYS_PROCS)];
14 } sys_map_t;
16 struct boot_image {
17 proc_nr_t proc_nr; /* process number to use */
18 task_t *initial_pc; /* start function for tasks */
19 int flags; /* process flags */
20 unsigned char quantum; /* quantum (tick count) */
21 int priority; /* scheduling priority */
22 int stksize; /* stack size for tasks */
23 short trap_mask; /* allowed system call traps */
24 bitchunk_t ipc_to; /* send mask protection */
25 int *k_calls; /* kern. call protection */
26 int nr_k_calls;
27 char proc_name[P_NAME_LEN]; /* name in process table */
28 endpoint_t endpoint; /* endpoint number when started */
31 typedef unsigned long irq_policy_t;
32 typedef unsigned long irq_id_t;
34 typedef struct irq_hook {
35 struct irq_hook *next; /* next hook in chain */
36 int (*handler)(struct irq_hook *); /* interrupt handler */
37 int irq; /* IRQ vector number */
38 int id; /* id of this hook */
39 int proc_nr_e; /* (endpoint) NONE if not in use */
40 irq_id_t notify_id; /* id to return on interrupt */
41 irq_policy_t policy; /* bit mask for policy */
42 } irq_hook_t;
44 typedef int (*irq_handler_t)(struct irq_hook *);
46 #endif /* TYPE_H */