cdc:nos2.source:nam5871:hhir
Table of Contents
HHIR
Table Of Contents
- [00015] PROC HHIR
- [00090] PROC HWLP
- [00091] PROC MGETS
- [00092] PROC MRELS
- [00093] PROC OSCHAPP
- [00094] PROC OTIME
- [00095] PROC OVLCALL
- [00096] PROC HGETNWL
- [00097] PROC XRECALL
- [00098] PROC XTRACE
Source Code
- HHIR.txt
- *DECK HHIR
- USETEXT NIPDEF
- USETEXT ACB
- USETEXT APPSTAT
- USETEXT AT
- USETEXT DRHDR
- USETEXT FREETAB
- USETEXT NWLHEAD
- USETEXT NWLNTRY
- USETEXT OVERLAY
- USETEXT PT
- USETEXT STATTAB
- USETEXT SYSCOMD
- USETEXT SWAPIN
- PROC HHIR; # HOST INTERFACE ROUTINE #
- STARTIMS;
- #
- *1DC HHIR
- *
- * 1. PROC NAME AUTHOR DATE
- * HHIR E. GEE 78/02/07
- *
- * 2. FUNCTIONAL DESCRIPTION.
- * THIS ROUTINE IS THE TOP LEVEL HOST-SIDE PROCESSING ROUTINE. ALL
- * PROCESSING NEEDED TO HANDLE CPU PROGRAM ACCESS TO THE NETWORK
- * IS INITIATED FROM HERE.
- *
- * 3. METHOD USED.
- * CHECK TO SEE IF THERE IS WORK TO DO. I.E. GET NWL BUFFER OR
- * PROCESS WORKLIST FROM OPERATING SYSTEM
- * IF NOTHING TO DO, GO INTO RECALL AND RETURN
- * GET SECOND NWL BUFFER
- * UNLESS ALREADY HAVE ONE, SO ONLY TWO WORKLISTS PROCESSED
- * OR UNLESS IN SHUTDOWN MODE AND THERE IS NO OTHER WORKLIST
- * SO THAT ONLY ONE WORKLIST IS PROCESSED DURING SHUTDOWN
- * IF NIP HAS A WORKLIST TO PROCESS, EXECUTE THE FOLLOWING
- * STEPS:
- * IF SECOND NWL EXISTS AND NOT IN SHUTDOWN, RESET
- * RA.SSC TO POINT TO SECOND NWL
- * SO OPERATING SYSTEM CAN SEND ANOTHER WORKLIST FOR NIP
- * TO PROCESS WHILE NIP IS PROCESSING FIRST ONE
- * IF NETOFF WORKLIST, CALL HPNOFF TO PROCESS IT
- * IF NETON WORKLIST, CALL HPNON TO PROCESS IT
- * IF NORMAL WORKLIST, VERIFY WORKLIST IS OKAY, SET FIELDS
- * IN ACB, AND CALL HWLP TO PROCESS THE WORKLIST
- * IF APPLICATION IS TO BE ABORTED, CALL XABTAPP TO DO IT
- * IF APPLICATION HAS FAILED, CALL HAPFAIL TO PROCESS IT
- * GET NEW NWL UNLESS IN SHUTDOWN MODE.
- * SWITCH NWL PTR WITH SECOND NWL PTR
- * SO NEXT NWL TO BE PROCESSED IS OLDER ONE
- * SET UP RA.SSC IF NOT PREVIOUSLY DONE
- *
- * 4. ENTRY PARAMETERS.
- * NWLADDR BUFFER TO HOLD SCP REQUEST
- * NWLPN PROCESS NUMBER OF APPLICATION AFTER NETON
- * NWLSIZE
- * SSCWORD LOCATION OF SUBSYSTEM CALL WORD
- *
- * 5. EXIT PARAMETERS.
- * NWLADDR LOCATION FOR AWL
- *
- * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
- * ACB APPSTAT AT
- * DRHDR NIPDEF NWLHEAD
- * NWLNTRY OVERLAY PT
- * STATTAB SYSCOMD
- * DRHDR MSGIDX NIPDEF
- * NWLHEAD NWLNTRY OVERLAY PARAMP
- * PARAMS PT STATTAB SYSCOMD
- *
- * 7. ROUTINES AND OVERLAYS CALLED.
- * HAPFAIL OVL PROCESS AN APPLICATION FAILURE
- * HPNOFF OVL PROCESS A *NETOFF* WORKLIST ENTRY
- * HPNON OVL PROCESS A *NETON* WORKLIST ENTRY
- * HWLP PROCESS WORKLIST
- * OTIME GET SYSTEM RTIME
- * OVLCALL LOAD OVERLAY
- * XABTAPP OVL ABORT THE APPLICATION
- * XTRACE TRACES CALLS
- *
- * 8. DAYFILE MESSAGE. NONE
- * THIS PROCEDURE IS CALLED BY XEXEC.
- *
- #
- STOPIMS;
- #
- EXTERNAL VARIABLES
- #
- XREF BEGIN
- PROC HWLP; # PROCESS WORKLIST #
- PROC MGETS; # ALLOCATE EMPTY BUFFER #
- PROC MRELS ;
- PROC OSCHAPP; # SCHEDULE APPLICATION #
- PROC OTIME; # GET SYSTEM RTIME #
- PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
- PROC HGETNWL; # UPDATE RA.SSC WORD #
- PROC XRECALL; # RECALL #
- PROC XTRACE; # TRACE CALLS #
- END
- #
- INTERNAL VARIABLES
- #
- ITEM AN U; # APPLICATION NUMBER #
- ITEM NEXTNWL U; # NEXT NWL BUFFER ADDRESS #
- ITEM HOSTSD B; # HOST SHUTDOWN INDICATOR #
- CONTROL IFEQ STAT,1;
- ARRAY STIME P(1); # RTIME BUFFER FOR STARTING TIME #
- BEGIN
- ITEM SMILS U(0,24,36); # STARTING TIME IN MILLESECONDS #
- END
- ARRAY ETIME P(1); # RTIME BUFFER FOR ENDING TIME #
- BEGIN
- ITEM EMILS U(0,24,36); # ENDING TIME IN MILLESECONDS #
- END
- ITEM STTEMP; # TEMPORARY STATISTICS VARIABLE #
- CONTROL FI;
- #**********************************************************************#
- BEGIN
- CONTROL IFEQ DEBUG,1;
- XTRACE("HHIR ") ;
- CONTROL FI;
- IF SSCLK[0]
- THEN # RECEIVED NEW NETWORK WORKLIST FROM APPLICATION #
- BEGIN # PROCESS INCOMING WORKLIST #
- CONTROL IFEQ STAT,1;
- OTIME(STIME); # GET SYSTEM TIME BEFORE PROCESSING WKLST #
- CONTROL FI;
- HOSTSD = SHUTDOWN;
- NWLADDR = SSCAP[0] - BLKHSIZE; # FWA OF NWL #
- #
- PRESET ABORT PARAMETERS IN CASE APPLICATION IS TO BE ABORTED
- #
- ABTADDR = NWLADDR; # FWA OF BUFFER TO HOLD SF.REGR SCP FUNC #
- ABTSIZE = SIZENWL; # SIZE OF SF.REGR SCP BUFFER #
- P<DRHDRWD> = 0;
- NEXTNWL = NEXTPTR[NWLADDR]; # NEXT FREE BUFFER AVAILABLE #
- IF NOT HOSTSD
- THEN # HOST NOT IN LOCAL SHUTDOWN MODE #
- BEGIN # TWO NWL WORKLISTS MAY BE OUTSTANDING AT ANY ONE TIME #
- HGETNWL(NEXTNWL); # UPDATE RA.SSC WORD TO PROVIDE NEW NWL #
- END
- P<NWLHEADER> = NWLADDR; # FWA OF NWL #
- #
- CHECK IF APPLICATION HAS FAILED
- #
- IF NWLSTAT[0] NQ 0
- THEN # APPLICATION HAS FAILED #
- FAILADR = NWLADDR; # NETWORK WORKLIST ADDRESS #
- ELSE
- BEGIN
- #
- CHECK IF APPLICATION IS REQUESTING NETOFF
- #
- P<NWLENTRY> = NWLADDR + NWLHSIZE;
- IF NWLOP[0] EQ WLOPNOFF
- THEN
- BEGIN # PROCESS NETOFF #
- OVLNAME = HPNOFFP; # NAME OF OVERLAY PROGRAM TO LOAD #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- END
- ELSE
- BEGIN
- #
- CHECK IF APPLICATION IS REQUESTING NETON
- #
- AN = NWLPN[0]; # APPLICATION NUMBER #
- IF AN EQ 0
- THEN
- BEGIN # ONLY NETON IS ALLOWED #
- IF NWLOP[0] EQ WLOPNON
- THEN
- BEGIN # PROCESS NETON #
- OVLNAME = HPNONP; # NAME OF OVERLAY PROGRAM TO LOAD #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- END
- ELSE # ABORT APP CAUSE IT HAS NOT NETTED ON #
- ABTAPPF = XNOTNETON; # SET ABORT-APPLICATION FLAG #
- END
- ELSE # APPLICATION NETTED ON #
- BEGIN
- #
- VALIDATE WORKLIST
- #
- IF AN GR ATHAN[0]
- THEN # APPLICATION NUMBER UNKNOWN #
- ABTAPPF = XBADPN; # SET ABORT-APPLICATION FLAG #
- ELSE
- BEGIN
- ACBADDR = ATACBA[AN]; # FWA OF APPLICATION-S ACB #
- P<ACB> = ACBADDR;
- IF NWLOP[0] EQ WLOPRSET
- THEN
- BEGIN # RESET WORKLIST COMING IN #
- IF P<ACB> NQ 0
- THEN
- BEGIN
- IF ACBWLFWA[0] NQ 0
- THEN
- BEGIN # RELEASE THE WHOLE WL #
- P<DRHDRWD> = ACBWLFWA[0] ;
- BLKBS [0] = ACBWLLWA[0] - P<DRHDRWD> + 1 ;
- MRELS(P<DRHDRWD>) ;
- ACBNWLWD[0] = 0 ;
- END # RELEASE THE WHOLE WORKLIST #
- IF ACBFLIST[0] NQ 0
- THEN
- BEGIN
- MRELS(ACBFLIST[0]) ;
- ACBFLIST[0] = 0 ;
- END
- END
- ATASBR[AN] = FALSE; # CLEAR NETWAIT FLAG IF SET#
- END # RESET WORKLIST #
- IF P<ACB> EQ 0 # APPLICATION NOT EXISTS #
- OR ACBJNWD[0] NQ NWLJOBID[0] # BAD APP NUMBER #
- OR ATNVFN[AN] # APPLICATION NETTED OFF #
- THEN # ABORT MISBEHAVED APPLICATION #
- ABTAPPF = XBADPN;
- ELSE
- BEGIN
- IF ACBWLFWA[0] NQ 0
- THEN # NIP IS STILL PROCESSING EARLIER WORKLIST#
- ABTAPPF = XOSWL; # SO ABORT ILL-BEHAVED APP #
- ELSE # NO OUTSTANDING WORKLIST EXISTS #
- BEGIN
- IF NWLAWLADDR[0] EQ 0
- THEN # NO ADDRESS WAS SPECIFIED TO WRITE AWL #
- ABTAPPF = XNOAWLA;
- ELSE # VALID WORKLIST FROM APPLICATION #
- BEGIN
- IF ATASBI[AN]
- THEN # SWAPIN PREVIOUSLY ISSUED FOR APP #
- BEGIN
- IF ACBSCPCB[0] EQ 0
- THEN # SWAPIN NOT COMPLETE YET #
- BEGIN # WAIT FOR SWAPIN TO COMPLETE #
- XRECALL(LOC(ACBSCPCB[0])); # ENTER RECALL #
- END
- ATASBSO[AN] = FALSE; # CLEAR SWAPPED OUT FLG#
- ATASBI[AN] = FALSE; # CLEAR SWAP IN FLAG #
- ACBID[0] = ACBIDVALUE; # RESTORE ACB ID #
- END
- ACBUCPADR[0] = NWLHADDR[0]; # UCP COMP BIT ADR #
- ACBNWLE[0] = NWLNE[0]; # NUMBER OF ENTRIES #
- ACBWLFWA[0] = NWLADDR; # FWA OF NWL #
- ACBWLADR[0] = NWLADDR + NWLHSIZE;
- ACBWLLWA[0] = NWLADDR + SIZENWL - 1; # LWA NWL #
- ACBAWLADDR[0] = NWLAWLADDR[0];
- HWLP; # PROCESS ALL NWL ENTRIES #
- END
- END
- END
- END
- END
- END
- END
- #
- CHECK IF APPLICATION IS TO BE ABORTED
- #
- IF ABTAPPF NQ 0
- THEN
- BEGIN # ABORT APPLICATION #
- OVLNAME = XABTAPPP; # NAME OF OVERLAY PROGRAM TO LOAD #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- END
- #
- CHECK IF APPLICATION HAS FAILED
- #
- IF FAILADR NQ 0
- THEN
- BEGIN # PROCESS APPLICATION FAILURE #
- OVLNAME = HAPFAILP; # NAME OF OVERLAY PROGRAM TO LOAD #
- OVLCALL; # LOAD AND EXECUTE OVERLAY #
- END
- IF HOSTSD
- THEN # NAM IS IN LOCAL SHUTDOWN MODE #
- BEGIN # ONLY ONE WORKLIST MAY BE OUTSTANDING #
- HGETNWL(NEXTNWL); # UPDATE RA.SSC TO PROVIDE NEW NWL BUFFER #
- END
- CONTROL IFEQ STAT,1;
- OTIME(ETIME); # GET SYSTEM TIME AFTER PROCESSING WORKLST#
- STTEMP = EMILS[0] - SMILS[0];
- IF STTEMP GR ST$LHI
- THEN # FOUND LARGER TIME INTERVAL #
- BEGIN
- ST$LHI = STTEMP; # LARGEST TIME INTERVAL #
- END
- IF STTEMP GR 200
- THEN # SPENT MORE THAN .2 SECONDS IN INTERVAL #
- BEGIN
- ST$MHI = ST$MHI + 1; # INCREMENT NO OF TIMES GREATER .2 SEC#
- END
- ST$THI = ST$THI + STTEMP; # INCREMENT TOTAL TIME PROCESSING #
- CONTROL FI;
- END # END NWL WORKLIST PROCESSING #
- ELSE # NO INCOMING WORKLIST TO PROCESS #
- BEGIN
- CONTROL IFEQ STAT,1; # STATISTICS ON #
- ST$ESB = ST$ESB + 1; # INCR NO OF TIMES WORKLIST FOUND EMPTY #
- CONTROL FI;
- END
- #
- CHECK FOR NETWORK SHUTDOWN
- #
- IF SHUTDOWN
- AND ATENTRYW[NVFAN] EQ 0 # NVF NETTED OFF #
- AND SWAPINFP EQ 0 # NO-ACB-SWAPIN-RING NOT EXIST #
- THEN
- BEGIN # PROCESS NETWORK TERMINATION #
- OVLNAME = XENDNAMP;
- OVLCALL;
- END
- RETURN;
- END
- TERM
cdc/nos2.source/nam5871/hhir.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator