-- FilerExceptionImpl.mesa (last edited by: Forrest on: April 28, 1980 9:29 AM) --
DIRECTORY
FilePageTransfer: FROM "FilePageTransfer" USING [Request],
FilerException: FROM "FilerException",
FilerPrograms: FROM "FilerPrograms",
Frame: FROM "Frame" USING [Alloc, Free],
RuntimeInternal: FROM "RuntimeInternal" USING [MakeFsi];
--Process: FROM "Process" USING [DisableAborts];
FilerExceptionImpl: MONITOR
IMPORTS Frame, RuntimeInternal --, Process
EXPORTS
FilerException, FilerPrograms =
BEGIN
FE: TYPE = RECORD [pFEPrev: PFE, req: FilePageTransfer.Request];
fsiFE: CARDINAL = RuntimeInternal.MakeFsi[SIZE[FE]];
PFE: TYPE = POINTER TO FE;
pFELast: PFE ← NIL; -- points to last of fifo queue of exception reports
report: CONDITION;
-- Waits for a Filer exception to occur
Await: PUBLIC ENTRY PROCEDURE RETURNS [rwReq: FilePageTransfer.Request] =
BEGIN
pFE, pFENext: PFE;
WHILE pFELast=NIL DO WAIT report ENDLOOP;
-- Remove first report from queue and return it
FOR pFE ← pFELast, pFE.pFEPrev WHILE pFE.pFEPrev~=NIL DO pFENext ← pFE; ENDLOOP;
rwReq ← pFE.req;
IF pFE=pFELast THEN pFELast ← NIL ELSE pFENext.pFEPrev ← NIL;
Frame.Free[pFE]
END;
-- Add report to end of queue
Report: PUBLIC ENTRY PROCEDURE [rwReq: FilePageTransfer.Request] =
BEGIN
pFE: PFE = LOOPHOLE[Frame.Alloc[fsiFE], PFE];
pFE↑ ← [pFELast, rwReq];
pFELast ← pFE;
NOTIFY report
END;
--Process.DisableAborts[@report];
END.
LOG
Time: February 27, 1979 9:51 PMBy: RedellAction: Created file from old CacheMissImpl.mesa
Time: November 16, 1979 2:24 PMBy: ForrestAction: Changed to allocate Frames for storage
Time: April 28, 1980 9:26 AMBy: ForrestAction: FrameOps => Frame.
Time: timeStampBy: yourNameAction: shortDescription