-- VolAllocMap.mesa (last edited by: Forrest on: March 7, 1980 8:43 PM)
DIRECTORY
FileInternal: FROM "FileInternal" USING [FilePtr, PageGroup],
LogicalVolume: FROM "LogicalVolume" USING [Handle, PageNumber];
VolAllocMap: DEFINITIONS =
BEGIN
FilePtr: TYPE = FileInternal.FilePtr;
GroupPtr: TYPE = POINTER TO FileInternal.PageGroup;
Handle: TYPE = LogicalVolume.Handle;
-- stoping operation (called from VolumeImpl, scavengeImpl)
Close: PROCEDURE [final: BOOLEAN];-- The sense of "final" is TRUE=flush Logical Volume/FALSE=stopping use for now
-- page group interfaces writing labels (called from FileImpl)
AllocPageGroup: PROCEDURE [vol: Handle, filePtr: FilePtr, groupPtr: GroupPtr, createFile: BOOLEAN]; -- allocates a group of pages and writes labels (group is a modifiable hint)
FreePageGroup: PROCEDURE [vol: Handle, filePtr: FilePtr, groupPtr: GroupPtr, deleteFile: BOOLEAN]; -- free a page group (deleting file if filePage=0 and deleteFile=TRUE);
-- Called from VolFileMapImpl to get new file map pages
AccessVAM: PROCEDURE [vol: Handle, volumePage: LogicalVolume.PageNumber, set, clear: BOOLEAN] RETURNS [busy: BOOLEAN]; -- set, clear or read one bit of vam, always returns the (previous) value;
END.
LOG
Time: April 13, 1978 3:32 PMBy: SPAction: Created file
Time: August 30, 1978 2:08 PM By: SPAction: use FilePtr’s
Time: August 28, 1979 5:35 PM By: ForrestAction: Changed Procs to use LogicalVolumeOps.Handle; took following stuff out of main body:
--File: FROM "File" USING [ID, Type],
-- page group interfaces writing labels
-- GetPageGroup: PROCEDURE [volume: Volume.ID, hint: FileInternal.PageGroup] RETURNS [FileInternal.PageGroup];
-- single page interfaces writing labels
-- CreateZPage: PROCEDURE [file: File.ID, type: File.Type] RETURNS [page: LogicalVolume.PageNumber];
-- FreeZPage: PROCEDURE [page: LogicalVolume.PageNumber, fileD: FileInternal.Descriptor];
-- CreateVPage: PROCEDURE [file: File.ID]RETURNS [LogicalVolume.PageNumber];
-- FreeVPage: PROCEDURE [file: File.ID, page: LogicalVolume.PageNumber];
-- low level bit map interface (no label writing)
-- GetBusy: PROCEDURE [volumePage: LogicalVolume.PageNumber] RETURNS [busy: BOOLEAN];
-- read the allocation state of page; TRUE if busy;
-- GetSetBusy: PROCEDURE [volumePage: LogicalVolume.PageNumber] RETURNS [busy: BOOLEAN];
-- set a page to busy and return its previous state (semaphore like lock here)
-- SetFree: PROCEDURE [volumePage: LogicalVolume.PageNumber];
-- free a page
-- GrabFirstFree: PROCEDURE [startPage: LogicalVolume.PageNumber] RETURNS [page: LogicalVolume.PageNumber];
-- find first free page and set it busy
Time: October 1, 1979 5:33 PM By: ForrestAction: took out Open:
Open: PROCEDURE [vol: LogicalVolume.Handle, init, rebuild: BOOLEAN];
Time: March 7, 1980 8:43 PM By: ForrestAction: Leaxically redefined types so would compile with new logicalVolume; take Handle out of close