315,6 → 315,32 |
|
/* Registration functions */ |
|
PID intr_server = NIL; |
extern TASK Interrupt_Server(void *arg); |
extern TASK Interrupt_Server_Prot(void *arg); |
|
static void intdrive_create(void *l) |
{ |
INTERRUPT_TASK_MODEL ht; |
int level; |
int wcet = 10000; // TODO: should be a parameter |
|
level = (LEVEL)l; |
|
interrupt_task_default_model(ht); |
interrupt_task_def_wcet(ht, wcet); |
interrupt_task_def_system(ht); |
interrupt_task_def_nokill(ht); |
|
if (level > 0) |
intr_server = task_create("Interrupt Server (Protected)",Interrupt_Server_Prot,&ht,NULL); |
else |
intr_server = task_create("Interrupt Server",Interrupt_Server,&ht,NULL); |
|
if (intr_server == NIL) |
printk("\nPanic!!! Can't create IntDrive task...\n"); |
} |
|
/*+ Registration function: +*/ |
LEVEL INTDRIVE_register_level(TIME capacity, TIME q_theta, int U, int flags) |
{ |
353,9 → 379,7 |
printk("INTDRIVE Init: %d %d %d\n", lev->capacity, lev->q_theta, lev->U); |
#endif |
|
//TODO !!! Fixing 10000 is not a clean way to work !!! |
if (intdrive_taskinit(l, 10000) == -1) |
printk("Error: INTDRIVE task not activated!\n"); |
sys_atrunlevel(intdrive_create, (void *) l, RUNLEVEL_INIT); |
|
return l; |
} |