return P->pid - Q->pid;
}
-\f
+
/*###### Tiny useful routine(s) ########################################*/
/*
return Cap_can_goto ? tgoto(cursor_address, x, y) : "";
}
-\f
+
/*###### Exit/Interrput routines #######################################*/
/*
hist_new[Frame_maxtask].pid = this->pid;
hist_new[Frame_maxtask].tics = tics = (this->utime + this->stime);
+#if 0
{ int i;
int lo = 0;
int hi = maxt_sav - 1;
}
}
}
+#else
+{
+ HST_t tmp;
+ const HST_t *ptr;
+ tmp.pid = this->pid;
+ ptr = bsearch(&tmp, hist_sav, maxt_sav, sizeof tmp, sort_HST_t);
+ if(ptr) tics -= ptr->tics;
+}
+#endif
+
// we're just saving elapsed tics, to be converted into %cpu if
// this task wins it's displayable screen row lottery... */
this->pcpu = tics;
return NULL;
}
-\f
+
/*###### Startup routines ##############################################*/
#ifdef PRETEND4CPUS