XlTQPrivate.mesa
Copyright Ó 1990, 1991, 1992 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, March 28, 1990
Christian Jacobi, June 15, 1992 5:16 pm PDT
TQRec:
TYPE =
MONITORED
RECORD [
--type which implements Xl.TQRep
selfProcess: PROCESS, -- process executing queued events
selfRunning: BOOL ¬ FALSE, -- process (selfProcess) exists or will come into existence soon
selfRunning2: BOOL ¬ FALSE, --
lockProcess: PROCESS, -- process holding lock [defined if lockCount>0 and ~selfProcess]
lockCount: CARD ¬ 0, -- number of locks of processes [defined if ~selfProcess];
-- lock is free if lockCount=0 AND ~this=NIL
eventCount: CARD ¬ 0, -- number of queued but not yet handled events
next: Job ¬ NIL, -- the next event to be handled
tail: Job ¬ NIL, -- for fast inclusion at end of tail
newEvent: CONDITION, -- running process sleeps before disappearing
lockWaiterCond: CONDITION, -- waiting for change in lock state
lockWaiterCount: INT ¬ 0, -- number of processes waiting on lockWaiterCond
upperLimit: CARD ¬2000, -- if there are more events we start throwing some away
this: Job ¬ NIL, -- Job in execution right now
free: Job ¬ NIL, -- list of free entries
freeCnt: CARD ¬ 0, -- number of entries on free list
order: INT ¬ 0, -- lock order
seq1, seq2: INT ¬ 0, -- lock order
dead: BOOL ¬ FALSE, -- set using debugger; useful to reduce number of hanging resources
props: <<PRIVATE>> REF ¬ NIL, --reserved for property list
priority: Process.Priority ¬ Process.priorityForeground, --used after fork only
createData: REF ¬ NIL -- useful for debugging
];