Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 978 → Rev 979

/shark/trunk/ports/first/modules/grubstar.c
860,13 → 860,24
struct timespec actual,ty;
int tx;
GRUBSTAR_level_des *lev = (GRUBSTAR_level_des *)(level_table[l]);
TIME reclaim=0;
TIME remain=0;
SYS_FLAGS f;
f=kern_fsave();
kern_gettime(&actual);
SUBTIMESPEC(&actual, &schedule_time, &ty);
 
tx = TIMESPEC2USEC(&ty);
mul32div32to32(tx,(lev->U - lev->Uf),lev->U,reclaim);
 
// the remain capacity is from the first dispatch so is less then
// actual capacity
return (lev->b[budget].avail-tx);
remain=lev->b[budget].avail-tx+reclaim;
kern_frestore(f);
 
return remain;
 
}
 
int GRUBSTAR_get_local_scheduler_level_from_budget(LEVEL l, int budget)