CommTimerPrivate.mesa
Copyright Ó 1988, 1991 by Xerox Corporation. All rights reserved.
Demers, October 9, 1990 4:55 pm PDT
CommTimerPrivate:
CEDAR
DEFINITIONS ~ {
Algorithm: t.nextMsec is the time (in msec since boot) when the daemon is next going to wake up and check things. At that time it will schedule every event e in the t.wheelIndex'th slot of the wheel such that e.whenMsec is less than t.grainSizeMsec beyond t.nextMsec.
TimerObject:
TYPE ~
MONITORED
RECORD [
grainSizeMsec: INT,
nextMsec: CARD ¬ 0,
daemon: PROCESS ¬ NIL,
destroyed: BOOL ¬ FALSE,
wakeup: CONDITION,
wheelIndex: CARDINAL ¬ 0,
wheel: SEQUENCE wheelSize: CARDINAL OF REF EventObject
];
EventObject:
PUBLIC
TYPE ~
RECORD [
next: REF EventObject,
gen: CARD ¬ 0,
whenMsec: INT,
proc: CommTimer.EventProc,
clientData: REF
];
Timer Glue
TicksSinceBoot:
PROC
RETURNS [Process.Ticks]
~ TRUSTED MACHINE CODE { "XR←TicksSinceBoot" };
}.