[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MiNT-1.11h2: ITIMER_VIRTUAL bug
There is a bug in the itimer functions: for the virtual timer the
system time is counted where is should be the user time.
--- dos.c~ Wed Sep 14 18:10:36 1994
+++ dos.c Sat Nov 12 00:42:58 1994
@@ -588,7 +588,7 @@
real_curproc = curproc;
curproc = p;
timeleft = p->itimer[ITIMER_VIRTUAL].reqtime
- - (p->systime - p->itimer[ITIMER_VIRTUAL].startsystime);
+ - (p->usrtime - p->itimer[ITIMER_VIRTUAL].startusrtime);
if (timeleft > 0) {
p->itimer[ITIMER_VIRTUAL].timeout =
addtimeout(timeleft, itimer_virtual_me);
@@ -705,10 +705,10 @@
*ovalue = oldtimer;
} else {
tmpold = curproc->itimer[which].reqtime
- - (curproc->systime - curproc->itimer[which].startsystime);
+ - (curproc->usrtime - curproc->itimer[which].startusrtime);
if (which == ITIMER_PROF)
tmpold -=
- (curproc->usrtime - curproc->itimer[which].startusrtime);
+ (curproc->systime - curproc->itimer[which].startsystime);
if (tmpold <= 0)
tmpold = 0;
*ovalue = tmpold;
--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"