SlackProcessConcreteTypes.mesa
Copyright © 1990 by Xerox Corporation. All rights reserved.
Bier, April 3, 1991 4:55 pm PST
Contents: The truth of the data structures used by SlackProcess.
DIRECTORY
Process, SlackProcess, ViewerClasses;
SlackProcessConcreteTypes: CEDAR DEFINITIONS = BEGIN
AbortProc: TYPE = SlackProcess.AbortProc;
ActionProc: TYPE = SlackProcess.ActionProc;
LoggingProc: TYPE = SlackProcess.LoggingProc;
OptimizeProc: TYPE = SlackProcess.OptimizeProc;
SlackHandleObj:
TYPE =
MONITORED
RECORD [
slackProcess: PROCESS,
queue: Queue,
qeGen: QueueEntryGenerator, -- so we don't have to reallocate the storage each time
optimizeProc: OptimizeProc,
log: Log,
abort: Abort,
priority: Process.Priority ← Process.priorityNormal,
pauseRequest: BOOL ← FALSE,
paused: CONDITION,
timedPaused: CONDITION
];
Queue: TYPE = REF QueueData;
QueueData:
TYPE =
RECORD [
notFull: CONDITION,
timedNotFull: CONDITION,
head: NAT ← 0,
tail: NAT ← 0,
size: NAT ← 0,
clientDatas: ClientDatas ← NIL,
optimizeHints: OptimizeHints ← NIL,
actions: Actions ← NIL,
actionProcs: ActionProcs ← NIL,
priorities: Priorities ← NIL,
events: QueueEvents
];
QueueEvents: TYPE = REF QueueEventsData;
QueueEventsData: TYPE = RECORD [SEQUENCE len: NAT OF Event]; -- eventually all the sequences should be merged into this one, by adding fields
Event:
TYPE =
RECORD [
priority: Process.Priority,
readOnly: BOOL ← FALSE
];
ClientDatas: TYPE = REF ClientDatasData;
ClientDatasData: TYPE = RECORD [SEQUENCE len: NAT OF REF];
OptimizeHints: TYPE = REF OptimizeHintsData;
OptimizeHintsData: TYPE = RECORD [SEQUENCE len: NAT OF REF];
Actions: TYPE = REF ActionsData;
ActionsData: TYPE = RECORD [SEQUENCE len: NAT OF REF];
ActionProcs: TYPE = REF ActionProcsData;
ActionProcsData: TYPE = RECORD [SEQUENCE len: NAT OF ActionProc];
Priorities: TYPE = REF PrioritiesData;
PrioritiesData: TYPE = RECORD [SEQUENCE len: NAT OF Process.Priority];
Log: TYPE = REF LogData;
LogData:
TYPE =
RECORD[
head: NAT ← 0,
size: NAT ← 0,
loggerEnabled: BOOL ← FALSE,
logger: LoggingProc ← NIL,
received: Received, -- received an action versus performed an action.
bashed: Bashed, -- bashed an action versus performed an action.
events: Events
];
Received: TYPE = REF ReceivedData;
ReceivedData: TYPE = RECORD[SEQUENCE len: NAT OF BOOL];
Bashed: TYPE = REF BashedData;
BashedData: TYPE = RECORD[SEQUENCE len: NAT OF BOOL];
Events: TYPE = REF EventsData;
EventsData: TYPE = RECORD[SEQUENCE len: NAT OF REF];
Abort: TYPE = REF AbortData;
AbortData:
TYPE =
RECORD [
enabled: BOOL ← FALSE,
proc: AbortProc,
viewer: ViewerClasses.Viewer,
data: REF
];
QueueEntryGenerator: TYPE = REF QueueEntryGeneratorObj;
QueueEntryGeneratorObj:
TYPE =
RECORD [
queue: Queue,
actionsInQueue: NAT
];
END.