ProcessBackdoor.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Hagmann on January 30, 1985 3:35:43 pm PST
Doug Wyatt, February 26, 1985 3:07:45 pm PST
DIRECTORY
PrincOps USING [PsbIndex];
ProcessBackdoor: CEDAR DEFINITIONS
= BEGIN
ParentChildCallback: TYPE = PROC [parentPsb, childPsb: PrincOps.PsbIndex];
SingleCallback: TYPE = PROC [Psb: PrincOps.PsbIndex];
RegisterEventProcs: PROC [
forkProc: ParentChildCallback,
joinProc: ParentChildCallback,
endProc: SingleCallback,
detachProc: SingleCallback
] RETURNS [
oldForkProc: ParentChildCallback,
oldJoinProc: ParentChildCallback,
oldEndProc: SingleCallback,
oldDetachProc: SingleCallback
];
Register procedures to be called during process events. The forkProc is called under the processLock MONITORLOCK within ProcessImpl. Any operations that require this lock (such an another FORK), or potentially long lasting (such as reference count operations, page faults) must be avoided. endProc is not called under monitor lock, and is called for all processes regardless of whether they are children or detatched. joinProc is called when a parent does a JOIN. It is also not done under monitor lock. detachProc is called during Detach and is under monitor lock.
CountFreeProcesses: PROC RETURNS [freeProcesses: CARDINAL];
END.