-- TiogaPGMonitor.Mesa -- last written by Pier. December 7, 1980 3:29 PM DIRECTORY TiogaPGStreams: FROM "TiogaPGStreams" USING [PGStreamMode, Block]; TiogaPGMonitor: DEFINITIONS IMPORTS TiogaPGStreams = BEGIN OPEN TiogaPGStreams; PGM: TYPE = REF PGMBody; PGMBody: TYPE; -- the monitored record CreatePGM: PROC [PGStreamMode] RETURNS [PGM]; -- creates monitored record for use in put/get AddToReadList: PROC [pgm: PGM, block: Block]; -- adds block to end of text read list or control read list GetFromTextList: PROC [pgm: PGM] RETURNS [Block]; -- removes first block from text read list -- returns NIL when certain that nothing more to read -- i.e., after there has been a call on ReadsDone GetFromControlList: PROC [pgm: PGM] RETURNS [Block]; -- removes first block from control read list -- returns NIL when certain that nothing more to read -- i.e., after there has been a call on ReadsDone ReadsDone: PROC [pgm: PGM]; -- promises that there will be no more calls on AddToReadList AddToWriteList: PROC [pgm: PGM, block: Block]; -- adds text block to end of deferred list -- adds control block to end of write list -- and then moves deferred list to end of write list GetFromWriteList: PROC [pgm: PGM] RETURNS [Block]; -- call this to get a block to write -- returns NIL when certain that nothing more to write -- i.e., after there has been a call on WritesDone WritesDone: PROC [pgm: PGM]; -- promises that there will be no more calls on AddToWriteList END.