*DECK NPRLB USETEXT NIPDEF USETEXT PARAMS USETEXT PIT USETEXT PRUBUFF PRGM NPRLB; STARTIMS ; # *1DC * 1. PROC NAME AUTHOR DATE * NPRLB E. GEE 85/05/04 * * 2. FUNCTIONAL DISCRIPTION. * RELEASE ALL FREE PRU BUFFERS BELONGING TO A PARTICULAR PIP * AND OF A PARTICULAR SIZE. * * 3. METHOD USED. * LOOP THROUGH PRU BUFFER FREE CHAIN RELEASING EACH PRU * BUFFER. * * 4. INPUT PARAMS. * PARAMS1 PRU BUFFER SIZE * PARAMS2 PIT ENTRY INDEX * * 5. EXIT PARAMS. * NONE. * * 6. COMMON DECKS AND SYMPL TEXTS USED. * NIPDEF CONSTANT DEFINITIONS * PARAMS BUFFER FOR PASSING PARAMS TO PRIMARY OVLS * PIT PIP INTERFACE TABLE TEMPLATE * PRUBUFF PRU BUFFER TEMPLATE * * 7. ROUTINES CALLED: * ABORT ABORT NIP * MRELS RETURN BUFFER TO FREE CHAIN * OMSG ISSUE DAYFILE MESSAGE * XTRACE TRACE PROCEDURE CALL. * * 8. DAYFILE MESSAGES OR OTHER IMPORTANT INFORMATION. * * * NPRLB - PRU BUFFERS NOT IN CHAIN. * * * THIS PROGRAM IS A SECONDARY OVERLAY LOADED BY SUBROUTINE * OVLCALL. WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO * LOCATION RJMAIN TO RETURN TO THE CALLING PROGRAM. * * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY * OVERLAY BUFFER SIZE MINUS 5 (360B WORDS). * * THIS OVERLAY IS CALLED BY XCHKCET. # STOPIMS; XREF BEGIN PROC ABORT; # ABORT NIP # PROC MRELS; # RETURN BUFFER # PROC OMSG; # ISSUE DAYFILE MESSAGE # PROC XTRACE; # TRACE PROCEDURE CALL # LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL # END # INTERNAL VARIABLES # ITEM I; # INDUCTION VARIABLE # ITEM TEMP1; # ADDR OF NEXT PRU BUF IN CHAIN # ARRAY ABTMSG S(4); # ABORT NIP DAYFILE MESSAGE # BEGIN ITEM ABTMSG1 C(0,00,34)=[" NPRLB - PRU BUFFERS NOT IN CHAIN."]; ITEM ABTMSGE U(3,24,36)=[0]; END BASED ARRAY PRUNIPWD S(1); # TEMPLATE FOR NIP WORD IN PIT # BEGIN ITEM PRUNIPMFB U(0,00,06); # MINIMUM NO OF PRU BUFS # ITEM PRUNIPMAB U(0,06,06); # MAXIMUM NO OF PRU BUFS # ITEM PRUNIPNCA U(0,12,12); # CURRENT NO OF BUFFERS ASSIGNED# ITEM PRUNIPNC U(0,24,12); # CURRENT NO OF PRU CONNECTIONS # ITEM PRUNIPFPB U(0,42,18); # ADR OF FIRST BUF IN FREE CHAIN# END #**********************************************************************# CONTROL EJECT; BEGIN # BEGIN NPRLB # CONTROL IFEQ DEBUG,1; XTRACE("NPRLB"); CONTROL FI; P = LOC(PITW5[PARAMS2]) - 1; # RELEASE ALL BUFFERS OF SIZE PARAMS1 AND LARGER # FOR I = PARAMS1 STEP 1 UNTIL MAXPRU DO # RELEASE ALL PRU BUFS IN CHAIN # BEGIN P = PRUNIPFPB[I]; # FIRST BUFFER IN CHAIN # TEMP1 = PRUBDLFP[0]; # ADDR OF NEXT BUFFER IN CHAIN # # RELEASE ALL BUFFERS IN FREE CHAIN # FOR I=I WHILE P NQ 0 DO # RELEASE UNTIL END OF CHAIN # BEGIN MRELS(P); # RELEASE THIS BUFFER # PRUNIPNCA[I] = PRUNIPNCA[I] - 1; # DECRE NO OF PRU BUFFERS # P = TEMP1; # ADDR OF NEXT BUFFER IN CHAIN # TEMP1 = PRUBDLFP[0]; # ADDR OF NEW NEXT BUF IN CHAIN # END IF PRUNIPNCA[I] EQ 0 THEN # RELEASED LAST BUFFER # BEGIN PRUNIPFPB[I] = 0; # CLEAR BUFFER POINTER # END ELSE # NOT ALL PRU BUFFERS IN CHAIN # BEGIN OMSG(ABTMSG,0); # ISSUE DAYFILE MESSAGE # ABORT(0,0); # ABORT NIP # END END GOTO RJMAIN; # RETURN TO CALLING PROGRAM # END # END NPRLB # TERM