IFSFileImplD.mesa
Levin - 30-Jun-81 17:29:53
Russ Atkinson, November 9, 1983 11:59 pm
IFSFileImplD:
MONITOR
EXPORTS IFSFilePrivate = BEGIN
OPEN IFSFilePrivate;
Global Variables --
freeList: IORequest;
Procedures exported to IFSFilePrivate --
InitializeFreeList:
PUBLIC
PROC = {
freeList ← NIL;
};
FinalizeFreeList:
PUBLIC
PROC = {
UNTIL freeList =
NIL
DO
request: IORequest ← freeList;
freeList ← freeList.link;
request.link ← NIL;
ENDLOOP;
};
GetIORequestBlock:
PUBLIC
ENTRY
PROC
RETURNS [request: IORequest] = {
IF freeList ~=
NIL
THEN {request ← freeList; freeList ← request.link}
ELSE request ← NEW[IORequestBlock];
};
FreeIORequestBlock:
PUBLIC
ENTRY
PROC [request: IORequest] = {
request.link ← freeList; freeList ← request;
};
END.