Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 824 → Rev 825

/shark/trunk/ports/first/modules/grubstar.c
252,11 → 252,13
SUBTIMESPEC(&schedule_time, &lev->cap_lasttime, &ty);
tx = TIMESPEC2USEC(&ty);
 
b->avail -= tx;
b->avail += lev->b[lev->tb[p]].last_reclaiming;
if (tx>=lev->b[lev->tb[p]].last_reclaiming) {
b->avail -= tx;
b->avail += lev->b[lev->tb[p]].last_reclaiming;
}
 
#ifdef GRUBSTAR_DEBUG
kern_printf("(GS:Cap p%d av=%d tx=%d)", p, b->avail,(int)tx);
kern_printf("(GS:Cap p%d av=%d tx=%d lr=%d)", p, b->avail,(int)tx, (int)lev->b[lev->tb[p]].last_reclaiming);
#endif
 
if (b->avail <= 0) {
826,11 → 828,11
int spare;
 
/* force a hard reservation event */
avail_budget=lev->b[lev->tb[exec_shadow]].avail;
lev->b[lev->tb[exec_shadow]].avail=0;
//level_table[proc_table[exec_shadow].task_level]->public_epilogue(proc_table[exec_shadow].task_level, exec_shadow);
avail_budget=lev->b[lev->tb[exec]].avail;
lev->b[lev->tb[exec]].flags = GRUBSTAR_NOACTIVE;
 
/* save the unused capacity */
spare=avail_budget+lev->b[lev->tb[exec_shadow]].avail;
spare=avail_budget+lev->b[lev->tb[exec]].avail;
if (spare<=0) spare=0;
}