Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 976 → Rev 977

/shark/trunk/ports/first/modules/grubstar.c
224,16 → 224,16
kern_printf("(GS:Act %d)",p);
#endif
 
TRACER_LOGEVENT(FTrace_EVT_server_active,0,(unsigned int)b);
TRACER_LOGEVENT(FTrace_EVT_server_active,proc_table[p].context,(unsigned int)b);
 
if (b->vtimer!=NIL) {
kern_event_delete(b->vtimer);
TIMESPEC_ASSIGN(acttime, &b->vtimer_istant);
//TIMESPEC_ASSIGN(acttime, &b->vtimer_istant);
}
b->vtimer=NIL;
//SUBTIMESPEC(&b->dline, acttime, &t2);
//if (/* 1 */ TIMESPEC_A_LT_B(&b->dline, acttime) ||
// /* 2 */ TIMESPEC_A_GT_B(&t3, &t2) ) {
SUBTIMESPEC(&b->dline, acttime, &t2);
if (/* 1 */ TIMESPEC_A_LT_B(&b->dline, acttime) ||
/* 2 */ TIMESPEC_A_GT_B(&t3, &t2) ) {
if (b->negotiation) {
lev->negotiation_in_progress--;
b->negotiation=0;
251,7 → 251,7
ADDUSEC2TIMESPEC(b->D, &b->dline);
b->avail = b->Q;
b->last_reclaiming = 0;
//}
}
if (b->flags==GRUBSTAR_RECLAIMING)
if (lev->Uf < lev->U) lev->Uf += b->Ub;
289,12 → 289,15
// recalculate the new effective last reclaiming
mul32div32to32(tx,(lev->U - lev->Uf),lev->U,b->last_reclaiming);
b->avail -= tx;
//b->avail -= tx;
b->avail -= (tx-b->last_reclaiming);
 
#ifdef GRUBSTAR_DEBUG
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
// kern_printf("(U %d, Uf %d)", lev->U, lev->Uf);
 
 
if (b->avail <= 0) {
TRACER_LOGEVENT(FTrace_EVT_server_exhaust,0,(unsigned int)(b));
b->flags = GRUBSTAR_NOACTIVE;
/shark/trunk/ports/first/first-server.c
613,8 → 613,17
msg->command = STD_SET_NEW_LEVEL;
msg->param = (void *)(local_scheduler_level);
task_message(msg,thread,0);
level_table[proc_table[thread].task_level]->public_dispatch(proc_table[thread].task_level, thread, 0);
level_table[proc_table[thread].task_level]->public_epilogue(proc_table[thread].task_level, thread);
//} else {
if (cap_timer != NIL) {
event_delete(cap_timer);
cap_timer = NIL;
}
scheduler();
kern_context_load(proc_table[exec_shadow].context);
kern_frestore(f);
free(msg);
} else return FSF_ERR_INTERNAL_ERROR;