DIRECTORY YggEnvironment, YggInternal, YggDummyProcess; YggLockControl: DEFINITIONS = BEGIN Initialize: PROC [lockZoneInitialSize: INT, hashArraySize: NAT]; ForkWatchdogProcess: PROC [ wakeupPeriod: YggDummyProcess.Milliseconds, abortWaitingRequestInterval: INT--seconds--, abortInactiveGrantedRequestInterval: INT--seconds--]; ConsTransHeader: PROC [trans: YggInternal.TransHandle] RETURNS [lockHeader: YggInternal.LockTransHeaderHandle]; AbortWaitingRequests: PROC [trans: YggInternal.TransHandle]; UpgradeLocks: PROC [trans: YggInternal.TransHandle]; ReleaseLocks: PROC [trans: YggInternal.TransHandle]; TransferLocks: PROC [from, to: YggInternal.TransHandle]; END. 4YggLockControl.mesa Copyright Ó 1985, 1988 by Xerox Corporation. All rights reserved. Last edited by MBrown on January 24, 1983 4:30 pm Hauser, March 8, 1985 10:40:03 am PST Bob Hagmann March 24, 1988 3:47:58 pm PST LockWatchdogProcess will wake up every wakeupPeriod milliseconds. It will abort any transaction with a waiting lock request older than abortWaitingRequestInterval seconds. It will abort any transaction T that has had no activity for the past abortInactiveGrantedRequestInterval seconds, if T holds a lock that blocks the progress of another transaction. ! (None) Cause all waiting lock requests for trans to fail, raising Lock.TransAborting. ! Lock.Failed[timeout], Lock.TransAborting For all update (intendUpdate, ...) locks l held in trans, convert l to a write (intendWrite, ...) lock. Must not call with lock requests waiting. ! (None) For all locks l held in trans, release l. Must not call with lock requests waiting. ! (None) Make "from"'s lock structure reference "to", instead. Hauser, March 8, 1985 10:39:43 am PST Nodified, added copyright. Ê®˜šœ™IcodešœB™B—šœ™Jšœ"™"K™%K™)—J˜šÏk ˜ Jšœ˜Jšœ ˜ Jšœ˜J˜J˜—Jšœ œ˜#˜JšÏn œœœœ˜@J˜šžœœ˜Jšœ+˜+JšœÏc œ˜,Jšœ%Ÿ œ˜5JšœA™AJšœD™DJšœ$™$JšœE™EJšœC™CJšœ+™+J˜—šžœœ!˜6Jšœ1˜8J˜—šžœœ"˜