YggLockControl.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
DIRECTORY
YggEnvironment,
YggInternal,
YggDummyProcess;
YggLockControl: DEFINITIONS = BEGIN
Initialize: PROC [lockZoneInitialSize: INT, hashArraySize: NAT];
ForkWatchdogProcess: PROC [
wakeupPeriod: YggDummyProcess.Milliseconds,
abortWaitingRequestInterval: INT--seconds--,
abortInactiveGrantedRequestInterval: INT--seconds--];
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.
ConsTransHeader: PROC [trans: YggInternal.TransHandle]
RETURNS [lockHeader: YggInternal.LockTransHeaderHandle];
AbortWaitingRequests: PROC [trans: YggInternal.TransHandle];
! (None)
Cause all waiting lock requests for trans to fail, raising Lock.TransAborting.
UpgradeLocks: PROC [trans: YggInternal.TransHandle];
! 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.
ReleaseLocks: PROC [trans: YggInternal.TransHandle];
! (None)
For all locks l held in trans, release l.
Must not call with lock requests waiting.
TransferLocks: PROC [from, to: YggInternal.TransHandle];
! (None)
Make "from"'s lock structure reference "to", instead.
END.
Hauser, March 8, 1985 10:39:43 am PST
Nodified, added copyright.