00001 #ifndef TYPE_H 00002 #define TYPE_H 00003 00004 #include <minix/com.h> 00005 #include <ibm/interrupt.h> 00006 00007 typedef _PROTOTYPE( void task_t, (void) ); 00008 00009 /* Process table and system property related types. */ 00010 typedef int proc_nr_t; /* process table entry number */ 00011 typedef short sys_id_t; /* system process index */ 00012 typedef struct { /* bitmap for system indexes */ 00013 bitchunk_t chunk[BITMAP_CHUNKS(NR_SYS_PROCS)]; 00014 } sys_map_t; 00015 00016 struct boot_image { 00017 proc_nr_t proc_nr; /* process number to use */ 00018 task_t *initial_pc; /* start function for tasks */ 00019 int flags; /* process flags */ 00020 unsigned char quantum; /* quantum (tick count) */ 00021 int priority; /* scheduling priority */ 00022 int stksize; /* stack size for tasks */ 00023 char proc_name[P_NAME_LEN]; /* name in process table */ 00024 endpoint_t endpoint; /* endpoint number when started */ 00025 }; 00026 00027 typedef unsigned long irq_policy_t; 00028 typedef unsigned long irq_id_t; 00029 00030 typedef struct irq_hook { 00031 struct irq_hook *next; /* next hook in chain */ 00032 int (*handler)(struct irq_hook *); /* interrupt handler */ 00033 int irq; /* IRQ vector number */ 00034 int id; /* id of this hook */ 00035 int proc_nr_e; /* (endpoint) NONE if not in use */ 00036 irq_id_t notify_id; /* id to return on interrupt */ 00037 irq_policy_t policy; /* bit mask for policy */ 00038 } irq_hook_t; 00039 00040 typedef int (*irq_handler_t)(struct irq_hook *); 00041 00042 #endif /* TYPE_H */
1.5.8