YggSTProcsImpl.mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
Bob Hagmann November 1, 1988 7:51:16 am PST
This module implements the "ST" procedures from Camelot. Camelot will make MIG style RPC's for ST←Vote, ST𡤌ommit, ST�ort, and ST←Suspend. The messages for these RPC's have already been fielded and the message has been unmarshalled. See the defs in src/lib/camlib/sys/st.defs and the generated st.h for the calling sequences.
WARNING: The top level "ST" procedures in this module are made public to the loader via the "-r" switch during compilation.
DIRECTORY
Camelot,
Mach,
YggTransaction;
YggSTProcsImpl: CEDAR PROGRAM
IMPORTS YggTransaction
~ BEGIN
Global (but not exported!) procedures
STVote: PROC [sPort: Mach.portT, btid: Camelot.btidT, timestamp: Camelot.timestampT, prepare: BOOL, result: POINTER TO Camelot.voteT] ~ {
Global name is ST←Vote.
Vote on the commit, abort, or read-only result of a transaction.
ERROR;
};
STCommit: PROC [sPort: Mach.portT, btid: Camelot.btidT] ~ {
Global name is ST𡤌ommit.
Camelot informs the server that the transaction committed
tid: YggTransaction.TransID;
tid.top ← btid;
[] ← YggTransaction.Finish[tid, commit];
};
STAbort: PROC [sPort: Mach.portT, btid: Camelot.btidT] ~ {
Global name is ST�ort.
Camelot informs the server that the transaction aborted
tid: YggTransaction.TransID;
tid.top ← btid;
[] ← YggTransaction.Finish[tid, abort];
};
STSuspend: PROC [sPort: Mach.portT, tid: Camelot.tidT, status: INT] ~ {
Global name is ST←Suspend.
Whoa! The transaction is trying to abort.
(Whoa is a pun: Yggdrasil is derived from the "the horse of Yggr" after all.)
YggTransaction.Suspend[tid, status];
};
Initialization
END.