kernel: new DEBUG_RACE option. try to provoke race conditions between processes.
[minix.git] / kernel / type.h
blob706a068d941556f9a8911a0582eb2c657ebbfb19
1 #ifndef TYPE_H
2 #define TYPE_H
4 #include <minix/com.h>
5 #include <machine/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 char proc_name[P_NAME_LEN]; /* name in process table */
24 endpoint_t endpoint; /* endpoint number when started */
27 typedef unsigned long irq_policy_t;
28 typedef unsigned long irq_id_t;
30 typedef struct irq_hook {
31 struct irq_hook *next; /* next hook in chain */
32 int (*handler)(struct irq_hook *); /* interrupt handler */
33 int irq; /* IRQ vector number */
34 int id; /* id of this hook */
35 endpoint_t proc_nr_e; /* (endpoint) NONE if not in use */
36 irq_id_t notify_id; /* id to return on interrupt */
37 irq_policy_t policy; /* bit mask for policy */
38 } irq_hook_t;
40 typedef int (*irq_handler_t)(struct irq_hook *);
42 #endif /* TYPE_H */