*DECK OSWAPIN IDENT OSWAPIN ENTRY OSWAPIN EXT OTIME SST *# *1DC OSWAPIN * * 1. PROC NAME AUTHOR DATE * OSWAPIN A. M. PRATT 76/04/20 * * 2. FUNCTIONAL DESCRIPTION. * THIS ROUTINE MAKES AN -SFCALL- TO THE OPERATING SYSTEM * REQUESTING THE SWAP-IN OF A CERTAIN APPLICATION. * * 3. METHOD USED. * SET UP * DO -SFCALL- * * 4. ENTRY PARAMETERS. * A1 = ADDRESS OF -SFCALL- PARAMETER WORDS * * 5. EXIT PARAMETERS. NONE * * 6. COMDECKS CALLED. * INPARU MACDEF STATTAB * * 7. ROUTINES CALLED. * OTIME GET SYSTEM RTIME * SFCALL SYS-CTL-PT CALL * XTRACE TRACES CALLS * * 8. DAYFILE MESSAGES. NONE * *# *CALL MACDEF *CALL INPARU STAT1 IFEQ STAT,1 *CALL STATTAB STAT1 ENDIF OSWAPIN BSSZ 1 DEBUG1 IFEQ DEBUG,1 SX6 A1 SA6 TEMP STAT2 IFEQ STAT,1 SA1 STIMEP PARAMETER BLOCK FOR CALLING OTIME RJ OTIME GET RTIME VALUE BEFORE CALL STAT2 ENDIF SX1 XOSWAP RJ XTRACE SA1 TEMP SA1 X1 DEBUG1 ELSE STAT3 IFEQ STAT,1 SX6 A1 SAVE ADDRESS OF PARAMETER BLOCK IN TEMP SA6 TEMP SA1 STIMEP PARAMETER BLOCK FOR CALLING OTIME RJ OTIME GET RTIME VALUE BEFORE CALL SA1 TEMP RESTORE ADDRESS OF PARAMETER BLOCK IN A1 SA1 X1 STAT3 ENDIF DEBUG1 ENDIF SA1 X1 GET ADDRESS OF CALL PARAMETER SA4 SWAPIN MX3 -6 BX1 X3*X1 BX6 X4+X1 SA6 A1 SFCALL A1 STAT4 IFEQ STAT,1 SA1 ETIMEP PARAMETER BLOCK FOR CALLING OTIME RJ OTIME GET RTIME VALUE AFTER CALL SA1 STIME STARTING RTIME VALUE MX0 24D MASK FOR RTIME MILLESECOND VALUE BX1 -X0*X1 CLEAR SECONDS FIELD SA2 ETIME ENDING RTIME VALUE BX2 -X0*X2 CLEAR SECONDS FIELD IX6 X2-X1 ELAPSED TIME FOR SWAPIN SA1 ST$LSI LARGEST TIME SPENT IN OSWAPIN IX5 X1-X6 DETERMINE IF LATEST TIME INTERVAL IS LARGER PL X5,OSW01 IF PREVIOUS TIME INTERVAL WAS LARGER SA6 ST$LSI SAVE NEW LARGEST TIME INTERVAL OSW01 SA3 ST$TSI PREVIOUS CUMULATIVE VALUE IX6 X3+X6 NEW CUMULATIVE VALUE SA6 ST$TSI MX6 -1 (X6)=-1 SA1 ST$NSI INCREMENT TOTAL NUMBER OF CALLS TO OSWAPIN IX6 X1-X6 (X6)=(X1)+1 SA6 ST$NSI STAT4 ENDIF EQ OSWAPIN EXT XTRACE SWAPIN VFD 60/SF.SWPI XOSWAP DATA L*SWAPI* TEMP BSS 1 STAT5 IFEQ STAT,1 EXT OTIME STIMEP VFD 60D/STIME ETIMEP VFD 60D/ETIME STIME BSS 1 START TIME FOR COMPARING SWAPIN TIME DELAY ETIME BSS 1 END TIME FOR COMPARING SWAPIN TIME DELAY STAT5 ENDIF END