Last edited by
MBrown on January 30, 1984 10:04:27 am PST
Hauser, March 8, 1985 10:58:42 am PST
Carl Hauser, October 4, 1985 1:36:20 pm PDT
LogRep:
DEFINITIONS =
BEGIN
wordsPerPage: CARDINAL = AlpineEnvironment.wordsPerPage;
RecordID: TYPE = AlpineLog.RecordID;
RecordType: TYPE = AlpineLog.RecordType;
StrBody: TYPE = AlpineInternal.StrBody;
PageVersion: TYPE = [0..1];
Header:
TYPE =
MACHINE
DEPENDENT
RECORD [
valid: BOOL,
version: PageVersion,
hasContinuation: BOOL,
isContinuation: BOOL,
unused: [0..7] ← 0,
nWords: [0..AlpineEnvironment.wordsPerPage]
includes SIZE[Header] words for the header itself
];
A Header record with nWords=0 and arbitrary other values is used to terminate a page.
RecordTypeHeader:
TYPE =
MACHINE
DEPENDENT
RECORD [
pad: [0..1] ← 0,
type: RecordType ];
NoopRecord:
TYPE =
MACHINE
DEPENDENT
RECORD [
pad: [0..1] ← 0,
type: RecordType ← noop,
fillPage: ARRAY [0..fillCount) OF WORD ← ALL[0] ];
fillCount: CARDINAL = wordsPerPage-SIZE[Header]-SIZE[RecordTypeHeader];
AssertNoopRecordSizeOK:
CARDINAL [wordsPerPage .. wordsPerPage] =
SIZE[NoopRecord] + SIZE[Header];
CheckpointCompleteRecord:
TYPE =
MACHINE
DEPENDENT
RECORD [
pad: [0..1] ← 0,
type: RecordType ← checkpointComplete,
thisRecordID: RecordID ← TRASH,
startAnalysisRecordID: RecordID,
keepRecordID: RecordID,
myFileStore: StrBody ← []];
CheckpointCompleteRecordSize:
PROC [nChars:
NAT]
RETURNS [size:
CARDINAL] =
INLINE {
RETURN [CheckpointCompleteRecord.SIZE - StrBody.SIZE + TEXT[nChars].SIZE] };
TransactionHeader:
TYPE =
MACHINE
DEPENDENT
RECORD [
pad: [0..1] ← 0,
type: RecordType,
transID: AlpineEnvironment.TransID ];
RestartRecord:
TYPE =
MACHINE
DEPENDENT
RECORD [
wordNumberForCheckpointCompleteRecord: INT,
recordIDForCheckpointCompleteRecord: RecordID ];
written in restart file, not in log
END.