TS/MP Pathsend and Server Programming Manual (H06.05+, J06.03+)
?PAGE "CANCEL ALL OUR OUTSTANDING I/O"
! This proc is called to cancel I/O posted but not completed. We
! use the io^posted flag in the control block to get the state of
! the I/O.
! This proc is called when one I/O in a transaction failed, either
! at initiation time or completion time.
PROC cancel^outstanding^io (cb^list^head);
INT .EXT cb^list^head (control^block^template); ! ptr to head of cb list
BEGIN
INT .EXT cb (control^block^template) := @cb^list^head;
WHILE @cb <> nil^addr DO
BEGIN
IF cb.io^posted
THEN ! this cb has I/O that hasn't completed
BEGIN
CALL CANCELREQ (cb.fnum, @cb);
IF <
THEN ! print an error msg and abend
CALL IO^error (cb.fnum);
cb.io^posted := false;
CALL write^trace^file (trace^cancel^request, cb.record^number);
END;
@cb := @cb.next^cb;
END; ! while
END; ! PROC cancel^outstanding^io
Pathsend Requester Example 147










