185,6 → 185,8 |
t3.tv_sec = t / 1000000; |
t3.tv_nsec = (t % 1000000) * 1000; |
|
kern_printf("(GS:Act %d)",p); |
|
if (b->vtimer!=NIL) kern_event_delete(b->vtimer); |
b->vtimer=NIL; |
|
338,9 → 340,9 |
} |
budget = (BUDGET_TASK_MODEL *)m; |
|
#ifdef GRUBSTAR_DEBUG |
//#ifdef GRUBSTAR_DEBUG |
kern_printf("(GS:PriIns:%d:%d", p, budget->b); |
#endif |
//#endif |
|
if (budget->b == -1) |
return; |
347,6 → 349,8 |
|
lev->tb[p] = budget->b; |
|
kern_printf("(GS:Curr:%d)", lev->b[budget->b].current); |
|
if (lev->b[budget->b].current == NIL && lev->b[budget->b].flags ) { |
/* This is the first task in the budget, |
the task have to be inserted into the master module */ |
360,9 → 364,9 |
iq_insertlast(p,&lev->b[budget->b].tasks); |
} |
|
#ifdef GRUBSTAR_DEBUG |
//#ifdef GRUBSTAR_DEBUG |
kern_printf(")"); |
#endif |
//#endif |
|
} |
|
370,9 → 374,9 |
{ |
GRUBSTAR_level_des *lev = (GRUBSTAR_level_des *)(level_table[l]); |
|
#ifdef GRUBSTAR_DEBUG |
//#ifdef GRUBSTAR_DEBUG |
kern_printf("(GS:Ext:%d)", p); |
#endif |
//#endif |
|
/* a task is removed from execution for some reasons. It must be |
that it is the first in its budget queue (only the first task in |
381,6 → 385,8 |
/* remove the task from execution (or from the ready queue) */ |
if (lev->b[lev->tb[p]].current == p) { |
|
kern_printf("(GS:Ext2:%d)", p); |
|
GRUBSTAR_account_capacity(lev,p); |
/* remove the task from the master module */ |
level_table[ lev->scheduling_level ]-> |
395,6 → 401,8 |
/* if so, insert the new task into the master module */ |
PID n; |
struct timespec t; |
|
kern_printf("(GS:Ext3:%d)", p); |
|
kern_gettime(&t); |
n = iq_getfirst(&lev->b[lev->tb[p]].tasks); |
491,6 → 499,10 |
switch((long)(m)) { |
|
case (long)(NULL): |
|
//#ifdef GRUBSTAR_DEBUG |
kern_printf("(GS:EndCycle:%d:%d)",p,lev->tb[p]); |
//#endif |
|
if (b->current == NIL && iq_query_first(&(b->tasks)) == NIL && b->flags != GRUBSTAR_RECLAIMING) { |
b->flags = GRUBSTAR_RECLAIMING; |
572,9 → 584,9 |
GRUBSTAR_level_des *lev = (GRUBSTAR_level_des *)(level_table[l]); |
int r; |
|
#ifdef GRUBSTAR_DEBUG |
//#ifdef GRUBSTAR_DEBUG |
kern_printf("(GS:SetBud)"); |
#endif |
//#endif |
|
for (r = 0; r < lev->n; r++) |
if (lev->b[r].Q == 0) break; |
599,6 → 611,8 |
lev->b[r].loc_sched_level = local_scheduler_level; |
lev->b[r].last_reclaiming = 0; |
|
kern_printf("(GS:EndBud %d)",r); |
|
return r; |
} |
else |