-- Swapper>SwapTask.mesa (last edited by Gobbel on November 26, 1979 5:21 PM)
DIRECTORY
CachedRegion: FROM "CachedRegion" USING [Desc],
PageMap: FROM "PageMap" USING [Flags],
VM: FROM "VM" USING [Interval, PageCount, PageNumber];
SwapTask: DEFINITIONS =
BEGIN
State: TYPE = RECORD [
next: PRIVATE PState,-- next in swapTaskList.
swapInterval: VM.Interval,-- the interval to be swapped.
flags: PageMap.Flags,-- of region when swap is finished.
bufferPage: VM.PageNumber,-- start of i/o buffer.
countRemaining: VM.PageCount,-- number of pages not yet transferred.
region: CachedRegion.Desc];-- desc to be checked-in upon completion.
PState: PRIVATE TYPE = POINTER TO State;
Fork: PROCEDURE [swapInterval: VM.Interval, flags: PageMap.Flags, bufferPage: VM.PageNumber, swapCount: VM.PageCount, region: CachedRegion.Desc]
RETURNS [forked: BOOLEAN];
-- Stores a State describing the swapping to be done on a swap unit of a region. If the operation is vacuous, no State is stored and forked=FALSE is returned.
Advance: PROCEDURE [interval: VM.Interval] RETURNS [state: State];
-- Returns the State which contains interval.page. If State.countRemaining=0, the State is also deleted.
END.
LOG
Time: During March 1978By: McJonesAction: Created file
Time: June 29, 1978 5:50 PMBy: McJonesAction: Moved PageCount, PageNumber to VM
Time: September 5, 1978 2:44 PMBy: RedellAction: Replaced over-complex ’Action’ record with ’flags’ field in swaptask ’State’ record. Added ’swapCount’ argument and ’forked’ result to Fork.
Time: September 20, 1979 9:45 AMBy: KnutsenAction: Added swapInterval. Added documentation.
Time: November 26, 1979 12:17 PMBy: GobbelAction: Added count to Advance.