Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 264 → Rev 265

/shark/trunk/oslib/kl/event.c
211,6 → 211,8
BYTE mask;
TIME t;
 
if (use_tsc) ll_init_advtimer();
 
IDT_place(0x40,ll_timer);
 
if (l->mode != LL_PERIODIC) {
228,8 → 230,8
/* Time-Constant = f_base (MHz) * tick (usec) */
/* If T-C == 0 -> T-C = 65536 (Max available) */
ticksize = t;
t = t * 1197;
t = t / 1000;
t = (signed long long)(t) * 1193182 / 1000000;
 
/* Only for security! This should cause timer overrun */
/* While 0 would set maximum period on timer */
if (t == 0)
274,8 → 276,6
nts = ticksize * 1000;
NULL_TIMESPEC(&actTime);
if (use_tsc) ll_init_advtimer();
 
/* Initialization of the general time variables */
NULLPITSPEC(&globalCounter);
lastTime = 0;
/shark/trunk/oslib/kl/event1.c
105,7 → 105,7
SUBTIMESPEC(&(firstevent->time), &now, &tmp);
}
tnext = TIMESPEC2USEC(&tmp);
tnext = (tnext * 1197) / 1000;
tnext = (signed long long)(tnext) * 1193182 / 1000000;
pit_setconstant(0, tnext);
}
}
186,7 → 186,7
}
/* SUBTIMESPEC(&(firstevent->time), &now, &ttmp); */
tnext = TIMESPEC2USEC(&ttmp);
tnext = (tnext * 1197) / 1000;
tnext = (signed long long)(tnext) * 1193182 / 1000000;
pit_setconstant(0, tnext);
 
activeEvent = 0;
235,7 → 235,7
}
/*SUBTIMESPEC(&now, &(firstevent->time), &tmp); */
tnext = TIMESPEC2USEC(&tmp);
tnext = (tnext * 1197) / 1000;
tnext = (signed long long)(tnext) * 1193182 / 1000000;
pit_setconstant(0, tnext);
}
}