Initialize:
PUBLIC
PROC [mdsiOther: BootFile.MDSIndex] =
BEGIN
Strategy: GermSwap.gCross and lCross are allocated in each MDS, initialised identically.
OPEN port: LOOPHOLE[Port, PrincOps.Port];
InitializeMDS[];
Set up frame for Procedure and make it pending on Port
port.dest ← [frame[PrincOpsUtils.MyLocalFrame[]]]; -- temporarily connect Port to self
Procedure[];
Now set up local and global frames with copy in other MDS
GermSwap.lCross.accesslink ← GermSwap.gCross;
GermSwap.lCross.pc ← port.frame.pc;
GermSwap.lCross.returnlink ← PrincOps.TrapLink;
PrincOpsUtils.Free[port.frame];
port.frame ← GermSwap.lCross;
now mustn't set global variables
PrincOpsUtils.Copy[
from: PrincOpsUtils.MyGlobalFrame[],
nwords: GermSwap.nGCross,
to: GermSwap.gCross];
PrincOpsUtils.LongCopy[
from: GermSwap.lCross,
nwords: GermSwap.nLCross+GermSwap.nGCross,
to: GermSwap.LP[GermSwap.lCross, mdsiOther]];
connect CrossMDSCall to Port
GermSwap.pMon.CrossMDSCall ←
LOOPHOLE[GermSwap.gCross+(@port-LOOPHOLE[PrincOpsUtils.MyGlobalFrame[], POINTER TO PrincOps.Port])];
GermSwap.pMon.pcCross ← GermSwap.lCross.pc
END;
InitializeMDS:
PUBLIC
PROC =
BEGIN
switches ← LOOPHOLE[GermSwap.LP[@PrincOps.SD[PrincOps.sBootSwitches], GermSwap.mdsiGerm], LONG POINTER TO GermSwap.Switches]^;
bootedFrom ← LOOPHOLE[GermSwap.LP[GermSwap.pRequest, GermSwap.mdsiGerm], LONG POINTER TO GermSwap.Request]^;
END;