-- DiskChannelBackend.mesa (last edited by: Yokota on: December 9, 1980 4:17 PM)
-- THINGS TO DO:
-- 1) Get procedure descriptors out of DriveObject to accommodate multiple MDS’s
DIRECTORY
Device USING [Type],
DiskChannel USING [Address, DiskPageCount, DiskPageNumber, DriveState, Handle, IORequestHandle],
PilotDisk USING [Handle];
DiskChannelBackend: DEFINITIONS =
BEGIN
DriveHandle: TYPE = LONG POINTER TO DriveObject;
DriveID: TYPE = RECORD [ -- representation of DiskChannel.Handle
type: Device.Type,
handle: PilotDisk.Handle];
DriveObject: TYPE = RECORD [
driveID: DriveID,
cylinders, movingHeads, fixedHeads, sectorsPerTrack: CARDINAL,
-- next field used only in Pilot, as opposed to channel, world
nPages: DiskChannel.DiskPageCount,
tag: CARDINAL, -- for exclusive use of the DiskChannel client
driverStorage: LONG POINTER, -- for exclusive use of the driver
locked: BOOLEAN, -- locks ability to access DriveObject
state: DiskChannel.DriveState,
changeCount: CARDINAL,
getStatus: GetStatusProc,
requestIO: RequestIOProc,
getPageAddress: GetPAProc,
getPageNumber: GetPNProc,
changeState: ChangeStateProc,
-- next two fields for the exclusive use of the DiskChannel implementation:
driveOrdinal: CARDINALNULL,
next: PRIVATE DriveHandle ← NULL];
RequestIOProc: TYPE = PROCEDURE [req: DiskChannel.IORequestHandle];
GetPAProc: TYPE = PROCEDURE [dH: DriveHandle, page: DiskChannel.DiskPageNumber] RETURNS [DiskChannel.Address];
GetPNProc: TYPE = PROCEDURE [dH: DriveHandle, page: DiskChannel.Address] RETURNS [DiskChannel.DiskPageNumber];
GetStatusProc: TYPE = PROCEDURE [dH: DriveHandle] RETURNS [ready: BOOLEAN, changeCount: CARDINAL];
-- Note that the GetStatusProc may cause changes to the DriveObject, in particular, changeCount
ChangeStateProc: TYPE = PROCEDURE [dH: DriveHandle, state: DiskChannel.DriveState];
RegisterDrive: PROCEDURE [drive: DriveHandle]; -- called by driver once for each drive
NotifyIOComplete: PROCEDURE [req: DiskChannel.IORequestHandle]; -- called by driver to indicate completion of IO
GetDrive: PROCEDURE [channel: DiskChannel.Handle] RETURNS [DriveHandle]; -- should be an inline
END.
LOG
Time: January 15, 1979 2:51 PMBy: HorsleyAction: Create file
Time: August 15, 1979 5:12 PMBy: RedellAction: Change DriveID to Drive
Time: August 16, 1979 10:57 PMBy: RedellAction: Add tag field to DriveObject
Time: January 31, 1980 5:41 PMBy: McJonesAction: Move Device types from OISProcesorFace to Device and Device handles from OISProcessorFace to OISDisk; add driveOrdinal
Time: June 10, 1980 10:30 AMBy: LuniewskiAction: Add changeCount, state and getStatus to DriveObject; add GetStatusProc
Time: June 23, 1980 4:41 PMBy: McJonesAction: OISDisk=>PilotDisk
Time: July 19, 1980 2:48 PMBy: JoseAction: Add changeState to DriveObject, type ChangeStateProc
Time: August 7, 1980 8:54 AMBy: LuniewskiAction: Add stateChangeLock to DriveObject.
Time: September 16, 1980 11:52 PMBy: JoseAction: Change stateChangeLock to stateChangeLocked, add caveats.
Time: December 9, 1980 4:17 PMBy: Yokota Action: stateChangeLocked is converted to general locked.