-- UtilityPilotKernelPack.pack

-- Code pack merging for all of UtilityPilotKernel

-- Yokota  March 25, 1981  5:35 PM  Misc.Resident is commented out and UserTerminalDriver.ResidentCool is added to KernelResidentCool
-- Gobbel  February 3, 1981  11:38 AM  Created from PilotKernelPack.pack
-- Levin  28-Apr-82 12:00:29  Flush DiskDrivers.AltoFileInterlock.

-- THE ORDER OF THE CODE PACKS BELOW IS CRUCIAL.
-- DO NOT REARRANGE THE ORDER OF ANYTHING UNLESS YOU
-- ARE SURE OF THE CONSEQUENCES.  In general, new packs will probably be
-- be placed later in the sequence, rather than earlier.

-- This file is used to merge all of the other CODE packaging specifications
-- so as minimize breakage.  This file is used as the next to the last .pack
-- file in the collection of files concatenated into the final packaging
-- specification.  (UtilityPilotKernelFrames.pack must be last.)

UtilityPilotVM: SEGMENT =
BEGIN

UtilityPilotVMImpl: CODE PACK =
  BEGIN
  UtilitySpaceImpl EXCEPT UtilityPilotVMInitialization;
  UtilityVMMControl EXCEPT UtilityPilotVMInitialization;
  END;

UtilityPilotVMInitialization: CODE PACK =
  BEGIN
  UtilitySpaceImpl [MAIN, Create, InitializeSpace, CreateForCode];
  UtilityVMMControl [MAIN, InitializePilotCounter, InitializePilotPerfMonitor,
    InitializePilotLoadState, InitializeTransactionData, InitializeVMMgr,
    RecoverTransactions, Log];
  END;
END;

UtilityPilotKernel: SEGMENT
  MERGES Control, DiskDrivers, Filer, MesaRuntime, Misc,
             Swapper, UserTerminalDriver =
BEGIN

KernelResident: CODE PACK =  -- must be first!
  -- This pack merges all of the resident code which goes in PrincOps real
  -- memory:
  BEGIN
  Control.ResidentSystem;
  DiskDrivers.Resident;
  Filer.Resident;
  MesaRuntime.Resident;
  -- Misc.Resident; Misc.Resident does not exist anymore
  Swapper.Resident;
  UserTerminalDriver.Resident;
  Control.SwappableSystem;
  DiskDrivers.SwappableDiskDrivers;
  Filer.LabelHacking;
  MesaRuntime.FrameImplHot;
  MesaRuntime.FrameImplCold;
  MesaRuntime.ProcessesHot;
  MesaRuntime.ProcessesCold;
  MesaRuntime.InLoadOutLoad;
  MesaRuntime.Signals;
  MesaRuntime.SnapshotMisc;
  MesaRuntime.Traps;
  Misc.Nodes;
  Misc.ByteBlt;
  Misc.HeapPruning;
  Misc.Attributes;
  Misc.CreateDelete;
  Misc.Recreating;
  Misc.Checking;
  Misc.Streams;
  Swapper.SwappableSwapperHot;
  Swapper.SwappableSwapperWarm;
  UserTerminalDriver.UserTerminalDriverSwappable;
  END;
  
KernelResidentCool: CODE PACK =  -- must be second!
   -- This pack merges all of the resident code which goes in
   --    non-PrincOps real memory:
  BEGIN
  Control.ResidentCool;
  DiskDrivers.ResidentCool;
  Filer.ResidentCool;
  MesaRuntime.ResidentCool;
  Misc.ResidentCool;
  Swapper.ResidentCool;
  UserTerminalDriver.ResidentCool;
  END;


KernelInitialization: CODE PACK =
  BEGIN
  Control.Initialization;
  DiskDrivers.Initialization;
  Filer.Initialization;
  MesaRuntime.Initialization;
  Misc.Initialization;
  Swapper.Initialization;
  UserTerminalDriver.Initialization;
  END;
END;

UtilityPilotFileMgrAndVM: SEGMENT
  MERGES FileMgr, UtilityPilotVM =
BEGIN

VMResident: CODE PACK =  -- must be first!
  -- This pack merges all of the resident code which goes in PrincOps real
  -- memory:
  BEGIN
  FileMgr.FileHelperProcess;  -- should be first!
  FileMgr.VMMHelperProcs;
  FileMgr.FileAttributes;
  FileMgr.FileSetSize;
  FileMgr.VFMChangingSize;
  FileMgr.FileCreate;
  FileMgr.FileDelete;
  FileMgr.FileMapLogging;
  FileMgr.OtherFileStuff;
  FileMgr.Volume;
  FileMgr.PhysicalVolume;
  FileMgr.Othello;
  FileMgr.Scavenger;
  UtilityPilotVMImpl;
  END;

VMInitialization: CODE PACK =
  BEGIN
  FileMgr.FileMgrInitialization;
  UtilityPilotVMInitialization;
  END;

Discard: DISCARD CODE PACK =
  BEGIN
  TransactionRelatedRunning;
  TransactionRelatedAborting;
  END;
END;