-- VMMgr>Hierarchy.mesa (last edited by Knutsen on November 8, 1979 8:47 AM)
-- Definitions:
-- A handle is strict if handle.page is the first page of a space or swap unit.
-- A handle is relaxed if handle.page is any other page of a space or swap unit.
DIRECTORY
CachedSpace: FROM "CachedSpace" USING [Desc, Handle],
VM: FROM "VM" USING [Interval, PageCount];
Hierarchy: DEFINITIONS =
BEGIN
Delete: PROCEDURE [handle: CachedSpace.Handle];
FindFirstWithin: PROCEDURE [handle: CachedSpace.Handle, count: VM.PageCount] RETURNS [CachedSpace.Handle];
-- Returns first "n’th cousin" starting within count pages of beginning of space, handleNull if none.
GetDescriptor: PROCEDURE [pDescResult: POINTER TO CachedSpace.Desc, handle: CachedSpace.Handle]
RETURNS [validSpace: BOOLEAN, validSwapUnit: BOOLEAN];
-- Various argument handles produce various results, as follows:
--handlepDescResult↑ validSpacevalidSwapUnit
--strict space handledesc of space, state~=missingTRUEFALSE
--relaxed space handledesc of space, state~=missingFALSEFALSE
--strict swap unit handledesc of parent space, state~=missingFALSETRUE
--relaxed swap unit handledesc of parent space, state~=missingFALSEFALSE
--invaliddummy desc, state=missingFALSEFALSE
GetInterval: PROCEDURE [handle: CachedSpace.Handle] RETURNS [validSpace: BOOLEAN, validSwapUnit: BOOLEAN, interval: VM.Interval];
-- Various argument handles produce various results, as follows:
--handleinterval validSpacevalidSwapUnit
--strict space handleinterval of spaceTRUEFALSE
--relaxed space handleinterval of spaceFALSEFALSE
--strict swap unit handleinterval of swap unitFALSETRUE
--relaxed swap unit handleinterval of swap unitFALSEFALSE
--invalid[0,0]FALSEFALSE
ValidSpaceOrSwapUnit: PROCEDURE [handle: CachedSpace.Handle] RETURNS [BOOLEAN];
-- Returns TRUE iff handle is a strict space handle or a strict swap unit handle.
Insert: PROCEDURE [handle: CachedSpace.Handle, count: VM.PageCount];
-- Sets pinned←FALSE, state←unmapped.
Touch: PROCEDURE [handle: CachedSpace.Handle];
-- May raise NotFound.
Update: PROCEDURE [pDesc: POINTER TO CachedSpace.Desc];
-- Updates cached copy (and sets dDirty←TRUE) if one exists; else updates in stree.
NotFound: ERROR;
END.
Notes
Replace GetDescriptor, GetInterval, GetState by GetShort (3 words) and GetLong (11 words)
LOG
Time: April 25, 1978 5:20 PMBy: McJonesAction: Created file
Time: September 10, 1978 1:31 PMBy: McJonesAction: Merged ValidHandle with GetXXX, etc.
Time: November 8, 1979 8:48 AMBy: KnutsenAction: Procedures return validSpace and validSwapUnit instead of validHandle. GetState replaced by ValidSpaceOrSwapUnit.