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
)];
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 */
40 typedef int (*irq_handler_t
)(struct irq_hook
*);