-- SwapperPack.pack

-- Last edited by:
-- Yokota  March 23, 1981  10:22 AM  Delete in CachedSpaceImpl is moved from Resident to ResidentCool. ResidentMemoryImpl and SwapperExceptionImpl in Resident are moved into ResidentCool. Some other procedures in Resident are moved into ResidentCool.

-- Knutsen  February 18, 1981  12:35 PM  Deleted MStoreImpl.Initialize.

-- McJones  February 3, 1981  4:37 PM  Add MStoreImpl.CheckRealPageMax

-- Gobbel  January 31, 1981  11:33 AM  Moved frame packs into PilotKernelFrames.pack.

-- Gobbel  January 19, 1981  6:34 PM  Create ResidentCool code pack

Swapper: SEGMENT =
BEGIN

Resident: CODE PACK =
  BEGIN
  CachedRegionImplA EXCEPT Initialization, ResidentCool;
  CachedRegionImplB EXCEPT Initialization;
  CachedSpaceImpl EXCEPT Initialization, ResidentCool;
  MStoreImpl EXCEPT Initialization, ResidentCool;
  PageFaultImpl EXCEPT Initialization;
  SwapBufferImpl EXCEPT Initialization, ResidentCool;
  SwapTaskImpl EXCEPT Initialization;
  END;

SwappableSwapperHot: CODE PACK =
  {SimpleSpaceImpl [ApplyToSpace, ForceOut, Map, Unmap]};

SwappableSwapperWarm: CODE PACK =
  {SimpleSpaceImpl [CopyIn, CopyOut, Kill]};

ResidentCool: CODE PACK =
  BEGIN
  CachedRegionImplA [AgingProcess, AwaitNotCheckedOut, FindUnreferenced, Insert,
    InitializeAllocateMStoreRuthlessly, InitializeDeallocateClean, InitializeInsertIfRoom];
  CachedSpaceImpl [Delete, Get, Insert, Update];
  MStoreImpl [AwaitBelowThreshold, CheckRealPageMax, DonateDedicatedRealMemory,
    Promise,
    -- CAUTION: RecoverMStore must be run BEFORE
    -- DeviceCleanup.Perform[disconnect] has run
    RecoverMStore];
  ResidentMemoryImpl EXCEPT Initialization;
  SwapBufferImpl [Error];
  SwapperControl EXCEPT Initialization;
  SwapperExceptionImpl EXCEPT Initialization;
  END;

Initialization: CODE PACK =
  BEGIN
  CachedRegionImplA [InitializeInternal, InitializeRegionCacheA,
    InitializeRegionCacheB, MAIN];
  CachedRegionImplB [Initialize, MAIN];
  CachedSpaceImpl [MAIN];
  MStoreImpl [InitializeMStore, MAIN, SetThreshold];
  PageFaultImpl [MAIN];
  ResidentMemoryImpl [InitializeResidentMemoryA, InitializeResidentMemoryB,
    MAIN];
  SimpleSpaceImpl [AllocateVM, Create, DescribeSpace, DescribeSpaceInternal,
    DisableInitialization, HandleFromPage, InitializeSimpleSpace, MAIN,
    SuperFromPage];
  SwapBufferImpl [InitializeSwapBuffer, MAIN];
  SwapperControl [InitializeSwapper, MAIN];
  SwapperExceptionImpl [MAIN];
  SwapTaskImpl [MAIN];
  END;

END; --SwapperPack.pack--