Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 278 → Rev 279

/shark/trunk/ports/first/modules/cbsstar.c
96,6 → 96,7
bandwidth_t U; /*+ the used bandwidth by the server +*/
 
int cap_lev;
struct timespec cap_lasttime;
 
LEVEL scheduling_level;
 
220,7 → 221,7
lev->cap_lev = NIL;
}
 
SUBTIMESPEC(&schedule_time, &cap_lasttime, &ty);
SUBTIMESPEC(&schedule_time, &lev->cap_lasttime, &ty);
tx = TIMESPEC2USEC(&ty);
b->avail -= tx;
 
427,8 → 428,10
/* ...and finally, we have to post a capacity event */
if (!nostop) {
TIMESPEC_ASSIGN(&ty, &schedule_time);
TIMESPEC_ASSIGN(&lev->cap_lasttime, &schedule_time);
ADDUSEC2TIMESPEC(lev->b[lev->tb[p]].avail,&ty);
lev->cap_lev = kern_event_post(&ty,capacity_handler, lev);
}
}
517,6 → 520,7
 
lev->U = 0;
lev->cap_lev = NIL;
NULL_TIMESPEC(&lev->cap_lasttime);
lev->scheduling_level = master;
 
return l;
/shark/trunk/ports/first/modules/grubstar.c
82,6 → 82,7
bandwidth_t Uf; /*+ the actual used bandwidth by the server +*/
 
int cap_lev;
struct timespec cap_lasttime;
 
LEVEL scheduling_level;
 
231,7 → 232,7
lev->cap_lev = NIL;
}
 
SUBTIMESPEC(&schedule_time, &cap_lasttime, &ty);
SUBTIMESPEC(&schedule_time, &lev->cap_lasttime, &ty);
tx = TIMESPEC2USEC(&ty);
 
b->last_reclaiming = (unsigned int)((long long)(tx) * (long long)(lev->U - lev->Uf)/MAX_BANDWIDTH);
284,6 → 285,7
GRUBSTAR_level_des *lev = l;
lev->cap_lev = NIL;
 
event_need_reschedule();
}
449,6 → 451,7
TIMESPEC_ASSIGN(&ty, &schedule_time);
ADDUSEC2TIMESPEC(lev->b[lev->tb[p]].avail,&ty);
lev->cap_lev = kern_event_post(&ty,capacity_handler, lev);
kern_gettime(&lev->cap_lasttime);
}
}
566,6 → 569,7
lev->U = 0;
lev->Uf = 0;
lev->cap_lev = NIL;
NULL_TIMESPEC(&lev->cap_lasttime);
lev->scheduling_level = master;
 
return l;