-- MOSSIMFIFOImpl.sak -- last edited by Suzuki: 20-Nov-81 16:02:15 DIRECTORY Connector, FIFO, MOSSIMFunc, Process, Scheduler; MOSSIMFIFOImpl: MONITOR IMPORTS Connector, MOSSIMFunc, Process, Scheduler EXPORTS FIFO ={ FIFOFunc: PUBLIC DEVICE [size: CARDINAL] = { IN Init, WriteRequest, ReadRequest: BOOLEAN, DIn: CARDINAL OUT SpaceAv, DataAv: BOOLEAN, DOut: CARDINAL GUARDIAN { Initialized: BOOLEAN _ FALSE; DO CHOICE { WHEN Init UP -> {IF ReadRequest OR WriteRequest THEN ERROR; Initialized _ TRUE} || WHEN ReadRequest UP -> IF ~Initialized OR Init OR ~DataAv THEN ERROR || WHEN WriteRequest UP -> IF ~Initialized OR Init OR ~SpaceAv THEN ERROR} ENDLOOP } MOSSIM fifo.sim }; NULL }. -- end of FIFO DEFINITION