-- RTProcess.Mesa -- last edited September 9, 1982 9:34 am by Paul Rovner DIRECTORY Process USING[Priority], RTBasic USING[TV], PSB USING[PsbIndex]; RTProcess: DEFINITIONS = BEGIN OPEN RTBasic; -- TYPEs Handle: TYPE = REF Object; Object: TYPE; Status: TYPE = {stopped, ready, waitingCV, waitingML, pageFault, invalid}; -- SIGNALs InvalidProcess: ERROR[h: Handle]; NotStopped: ERROR[h: Handle]; InvalidPriority: ERROR[h: Handle, p: Process.Priority]; -- PROCs for dealing with Cedar processes GetStatus: PROC[h: Handle] RETURNS[Status]; Stop: PROC[h: Handle]; Proceed: PROC[h: Handle]; ReturnFrom: PROC[h: Handle, frameFromWhichToReturn: TV, result: TV _ NIL]; -- raises NotStopped Abort: PROC[h: Handle]; -- raises NotStopped TopFrame: PROC[h: Handle] RETURNS[TV--for a frame--]; -- raises NotStopped ChangePriority: PROC[h: Handle, new: Process.Priority] RETURNS[old: Process.Priority]; -- raises NotStopped, InvalidPriority Current: PROC RETURNS[Handle]; PSBIToHandle: PROC[psbi: PSB.PsbIndex] RETURNS[Handle]; -- returns NIL if psbi isn't a Cedar rpocess HandleToPSBI: PROC[h: Handle] RETURNS[PSB.PsbIndex]; EnumerateCedarProcesses: PROC[p: PROC[Handle] RETURNS[stop: BOOLEAN]] RETURNS[stopped: BOOLEAN]; Valid: PROC[h: Handle] RETURNS[BOOLEAN]; PageFaults: PROC[h: Handle] RETURNS[LONG INTEGER]; CellsAllocated: PROC[h: Handle] RETURNS[LONG INTEGER]; RegisterTerminationNotifier: PROC[h: Handle, p: PROC[Handle]]; -- escape hatch SetAttachment: PROC[h: Handle, attachment: REF ANY]; GetAttachment: PROC[h: Handle] RETURNS[REF ANY]; --PROCs for dealing with non-Cedar processes IsAlive: PROC[psbi: PSB.PsbIndex] RETURNS[BOOLEAN]; --PROCs for controlling the page fault watcher StartWatchingFaults: PROC; StopWatchingFaults: PROC; GetTotalPageFaults: PROC RETURNS[LONG INTEGER]; GetPSBIPageFaults: PROC[psbi: PSB.PsbIndex] RETURNS[LONG INTEGER]; ClearFaultHistory: PROC; EnumerateFaultingProcesses: PROC[p: PROC[psbi: PSB.PsbIndex, pageFaultCount, numberEnumerated: LONG INTEGER] RETURNS[stop: BOOLEAN]] RETURNS[stopped: BOOLEAN]; END. Κ1– "Mesa" style˜IprocšύΟcJœΟk œ žœžœžœžœžœž œžœžœ  œžœžœžœ žœA œžœžœžœ$*œΟn œžœ žœŸœžœŸœžœŸ œžœ$žœ žœžœœŸœžœœŸœžœ žœžœœŸœžœ)žœ(œŸœžœžœŸ œžœžœ žœ-œŸ œžœ žœžœŸœžœžœ žœžœ žœ žœŸœžœ žœžœŸ œžœ žœžœžœŸœžœ žœžœžœŸœžœžœœŸ œžœžœžœŸ œžœ žœžœžœ-œŸœžœžœ žœžœ/œŸœžœŸœžœŸœžœžœžœžœŸœžœžœ žœžœžœŸœžœŸœžœžœžœXžœžœ*žœžœ žœ žœžœ˜ε—…—θ