Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 277 → Rev 278

/shark/trunk/ports/first/modules/grubstar.c
105,14 → 105,9
b->avail += b->Q;
if (b->avail > b->Q) b->avail = b->Q;
if (b->flags==GRUBSTAR_RECLAIMING && b->avail>0) {
lev->Uf += b->Ub;
if (b->flags==GRUBSTAR_RECLAIMING && b->avail>0)
lev->Uf += b->Ub;
 
#ifdef GRUBSTAR_DEBUG
kern_printf("BW=%ld, U=%u, Uf=%u",(long)bw, lev->U, lev->Uf);
#endif
}
 
if (b->avail > 0) b->flags = GRUBSTAR_ACTIVE;
 
if (b->current == NIL && b->flags) {
168,7 → 163,7
lev->Uf -= b->Ub;
#ifdef GRUBSTAR_DEBUG
kern_printf("bw=%ld, U=%u, Uf=%u",(long)bw, lev->U, lev->Uf);
kern_printf("U=%u, Uf=%u",lev->U, lev->Uf);
#endif
 
}
202,21 → 197,13
TIMESPEC_ASSIGN(&b->dline, acttime);
ADDUSEC2TIMESPEC(b->T, &b->dline);
b->avail=b->Q;
 
}
 
if (b->flags==GRUBSTAR_RECLAIMING) {
if (b->flags==GRUBSTAR_RECLAIMING)
lev->Uf += b->Ub;
#ifdef grubSTAR_DEBUG
kern_printf("BW=%ld, U=%u, Uf=%u",(long)bw, lev->U, lev->Uf);
#endif
 
}
 
b->flags=GRUBSTAR_ACTIVE;
 
 
/* record the current task inserted in the master module */
b->current = p;
246,9 → 233,6
 
SUBTIMESPEC(&schedule_time, &cap_lasttime, &ty);
tx = TIMESPEC2USEC(&ty);
#ifdef GRUBSTAR_DEBUG
kern_printf("(GS:Cap p%d av=%d)", p, b->avail);
#endif
 
b->last_reclaiming = (unsigned int)((long long)(tx) * (long long)(lev->U - lev->Uf)/MAX_BANDWIDTH);
 
255,7 → 239,7
b->avail -= tx - b->last_reclaiming;
 
#ifdef GRUBSTAR_DEBUG
kern_printf("(GS:Cap p%d av=%d Uf=%u U=%u, tx=%d)", p, b->avail,lev->Uf, lev->U,(int)tx);
kern_printf("(GS:Cap p%d av=%d Uf=%u U=%u, tx=%d)", p, b->avail, lev->Uf, lev->U,(int)tx);
#endif
 
if (b->avail <= 0) b->flags = GRUBSTAR_NOACTIVE;