IFSFileImplD.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Levin - 30-Jun-81 17:29:53
Russ Atkinson, March 7, 1985 2:20:32 pm PST
DIRECTORY
IFSFilePrivate USING [IORequest, IORequestBlock];
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.