cdc:nos2.source:nam5871:csscsr
Table of Contents
CSSCSR
Table Of Contents
- [00007] PROC CSSCSR
- [00008] CSSCSR - COMPLETE STATUS REQUEST
- [00013] COMPLETE STATUS REQUEST.
- [00042] PROC MOVEI
- [00043] PROC SSBCBW
- [00044] PROC SSBTBW
- [00045] PROC SSTAQE
Source Code
- CSSCSR.txt
- *DECK CSSCSR
- USETEXT TEXTSS;
- USETEXT TEXTCS;
- USETEXT TXTSMCS;
- USETEXT TXTSUSS;
- USETEXT TXTAPSS;
- PROC CSSCSR;
- # TITLE CSSCSR - COMPLETE STATUS REQUEST #
- BEGIN # CSSCSR #
- #
- ** CSSCSR - COMPLETE STATUS REQUEST.
- *
- * C. BRION 82/05/06.
- *
- * PROC CSSCSR
- *
- * ENTRY:
- *
- * WCBUF = ONE WORD ENTRY DESCRIPTOR WORD OF QUEUE ENTRY THAT
- * CONTAINS THE STATUS RESPONSE SM.
- *
- * ABH = ONE WORD APPLICATION BLOCK HEADER OF THE SM.
- *
- *
- * EXIT:
- *
- * THE NPUCB AND OCB ARE UPDATED.
- *
- * IF STATUS IS COMPLETE, AN EVENT TO CONCLUDE THE STATUS REQUEST
- * IS SENT TO THE EVENT PROCESSOR.
- #
- #
- **** PROC CSSCSR XREF LIST.
- #
- XREF
- BEGIN
- PROC MOVEI; # MOVE CM WORD INDIRECT #
- PROC SSBCBW; # SS- CLEAR BIT IN WORD #
- PROC SSBTBW; # SS- TEST BIT IN WORD #
- PROC SSTAQE; # SS-ACCEPT QUEUE ENTRY #
- END
- #
- ****
- #
- #
- * PROC CSSCSR ITEM DEFINITIONS.
- #
- ITEM NPUORD U; # NPU ORDINAL #
- ITEM I U; # LOOP VAR #
- ITEM OCBORD U; # OCB ORDINAL #
- ITEM MATCH B; # MATCH INDICATOR#
- $BEGIN
- ITEM DBVAR U;
- $END
- #
- * FLG$WORD - THIS BASED ARRAY POINTS TO THE PENDING STATUS REQUEST
- * WORD IN THE NPUCB.
- #
- BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
- BEGIN
- ITEM FW$WORD I(00,00,60);
- END
- #
- * MAIN PROCEDURE START.
- #
- #
- * LOCATE THE NPUCB THAT HAS THE NODE NUMBER EQUAL TO THE SOURCE
- * NODE OF THE ABH AND THE HOST NODE NUMBER EQUAL TO THE DESTINA-
- * TION NODE OF THE ABH. THIS MATCH WILL ALWAYS OCCUR.
- #
- MATCH = FALSE;
- FOR I = 0 STEP 1 WHILE NOT MATCH
- DO
- BEGIN
- IF (ABHSN[0] EQ NPU$NID[I]
- AND ABHDN[0] EQ NPU$HID[I])
- THEN
- BEGIN
- NPUORD = I;
- MATCH = TRUE;
- END
- END
- #
- * CHECK TO VERIFY THAT A CURRENT STATUS OPERATOR STILL EXISTS FOR
- * THIS NPUCB. IF NOT, EXIT.
- #
- IF NPU$OPST[NPUORD] EQ 0
- THEN
- GOTO ENDEXIT;
- #
- * A CURRENT STATUS OPERATOR STILL ACTIVE ON THIS NPUCB.
- * INSURE THAT THE OCB ORDINAL IS WITHIN RANGE. IF NOT,
- * PROBABLY MEANS THAT THE OPERATOR ENTERED A BREAK OR THE
- * CONNECTION WAS TERMINATED.
- #
- OCBORD = NPU$OPST[NPUORD];
- IF OCBORD LQ MAXACN$
- THEN
- BEGIN
- OC$CNPU[OCBORD] = 0;
- END
- NPU$OPST[NPUORD] = 0;
- IF (OCBORD GQ HOPORD$ AND OCBORD LQ MAXACN$)
- THEN
- BEGIN
- OC$NCNT[OCBORD] = OC$NCNT[OCBORD] - 1;
- P<FLG$WORD> = LOC(NPU$STFLGS[NPUORD]);
- SSBCBW(FLG$WORD,OCBORD);
- #
- * IF ALL AFFECTED NPUS HAVE RESPONDED, ISSUE STATUS DONE EVENT TO
- * CAUSE THE READY.. MESSAGE TO THE OPERATOR VIA THE EVENT QUEUE TO
- * THE EVENT PROCESSOR.
- * ALSO, CLEAR THE CURRENT VERB FOR THE OCB.
- #
- IF OC$NCNT[OCBORD] EQ 0
- THEN
- BEGIN
- WCB$WC[1] = 2; # SET EVENT ENTRY SIZE #
- WCB$SMID[1] = SMID"STUFIN"; # SET EVENT CODE #
- ABHADR[1] = OCBORD; # SET ACN ADDR IN ABH #
- SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CSSM[1]);
- OC$VERB[OCBORD] = " ";
- END
- #
- * IF THERE ARE STILL OUTSTANDING STATUS REQUEST TO BE MADE, THEN
- * IF THERE IS ANOTHER STATUS REQUEST PENDING FOR AN NPU THAT IS NOT
- * BUSY, THEN SAVE THE OCB ORDINAL IN THE NPUCB, SET THE CURRENT
- * AFFECTED NPUCB ORDINAL IN THE OCB, AND SEND THE STATUS REQUEST
- * TO THE NPU.
- #
- ELSE
- BEGIN
- MATCH = FALSE;
- P<FLG$WORD> = LOC(NPU$STFLGS[0]);
- FOR I=0 STEP 1 WHILE NOT MATCH AND
- I LS CSNPCNT
- DO
- BEGIN
- SSBTBW(FLG$WORD[I],OCBORD,MATCH);
- IF MATCH
- THEN
- BEGIN
- IF NPU$OPST[I] NQ 0
- THEN
- BEGIN
- MATCH = FALSE;
- END
- END
- END
- IF MATCH
- THEN
- BEGIN
- I = I - 1;
- OC$CNPU[OCBORD] = I;
- NPU$OPST[I] = OCBORD;
- WCB$WORD[1] = OC$WC[OCBORD] + 2;
- ABHWORD[1] = OC$TLC[OCBORD];
- ABHBT[1] = APPSUP;
- ABHABT[1] = APPSUP;
- ABHDN[1] = NPU$NID[I];
- ABHSN[1] = NPU$HID[I];
- ABHACT[1] = ACTCSNP$;
- MOVEI(OC$WC[OCBORD],LOC(OC$SM[OCBORD]),LOC(CSSM[1]));
- SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
- END
- END
- END
- #
- * CHECK IF THERE IS ANOTHER PENDING STATUS REQUEST FOR THE NPU
- * THAT JUST COMPLETED. IF SO, THEN SET THE CURRENT AFFECTED
- * NPUCB ORDINAL IN THE OCB, SET THE CURRENT STATUS OCB ORDINAL
- * IN THE NPUCB, AND SEND THE STATUS REQUEST TO THE NPU.
- #
- IF NPU$STFLGS[NPUORD] NQ 0
- THEN
- BEGIN
- MATCH = FALSE;
- P<FLG$WORD> = LOC(NPU$STFLGS[NPUORD]);
- FOR I=HOPORD$ STEP 1 WHILE NOT MATCH AND
- I LQ MAXACN$
- DO
- BEGIN
- SSBTBW(FLG$WORD,I,MATCH);
- IF MATCH
- THEN
- BEGIN
- IF OC$CNPU[I] NQ 0
- THEN
- BEGIN
- MATCH = FALSE;
- END
- END
- END
- IF MATCH
- THEN
- BEGIN
- I = I - 1;
- OC$CNPU[I] = NPUORD;
- NPU$OPST[NPUORD] = I;
- WCB$WORD[1] = OC$WC[I] + 2;
- ABHWORD[1] = OC$TLC[I];
- ABHBT[1] = APPSUP;
- ABHABT[1] = APPSUP;
- ABHDN[1] = NPU$NID[NPUORD];
- ABHSN[1] = NPU$HID[NPUORD];
- ABHACT[1] = ACTCSNP$;
- MOVEI(OC$WC[I],LOC(OC$SM[I]),LOC(CSSM[1]));
- SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
- END
- END
- ENDEXIT:
- $BEGIN
- DBVAR = 1;
- $END
- END #CSSCSR#
- TERM
cdc/nos2.source/nam5871/csscsr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator