Trailing-Edge
-
PDP-10 Archives
-
bb-bt99g-bb
-
sprout.c10
There is 1 other file named sprout.c10 in the archive. Click here to see a list.
REP 34/1 ;10C1
SPOEDT==2540 ;EDIT LEVEL
WIT
SPOEDT==2541 ;EDIT LEVEL
INS 231/3 ;10C2
2541 SPROUT doesn't handle hung devices or CPU failures. Add the code
so it knows what to do.
SPR 10-35031 GCO 10135 8-Jan-85 /LWS
REP 26/31 ;10C3
$CALL SHUTDN ;SHUT DOWN THE STREAM
WIT
MOVE S1,J$LJFN(J) ;[2541] GET THE CHANNEL NUMBER
RESDV. S1, ;[2541] RESET THE DEVICE
JFCL ;[2541] SHUT DOWN NO MATTER WHAT
$CALL SHUTIN ;[2541] SHUT DOWN THE STREAM
REP 33/31 ;10C4
MOVE S2,J ;GET THE JOBPAG ADDRESS
WIT
SHUTIN: MOVE S2,J ;[2541] GET THE JOBPAG ADDRESS
REP 10/120 ;10C5
HRRI T2,PS.RDO+PS.ROD+PS.ROL ;AND CONDITIONS
WIT
;**;[2541] Change 1 line at INTCNL+6L. /LWS
HRRI T2,PS.RDO+PS.ROD+PS.ROL+PS.RDH ;[2541] AND CONDITIONS
INS 37/121 ;10C6
;**;[2541] Add code at DVINTR+10L. /LWS
TXNE T1,PS.RDH ;[2541] HUNG DEVICE?
JRST DVIN.1 ;[2541] YEP
REP 41/121 ;10C7
MOVX T1,PSF%DO ;GET SCHED OFFLINE FLAG
IORM T1,JOBSTW(S1) ;SET IT
WIT
MOVX T2,PSF%DO ;[2541] GET SCHED OFFLINE FLAG
IORM T2,JOBSTW(S1) ;[2541] SET IT
TXC T1,PS.RIE+PS.ROE+PS.RDO ;[2541] CHECK FOR CPU FAILURE
TXNN T1,PS.RIE+PS.ROE+PS.RDO ;[2541] DEAD CPU?
JRST DVIN.2 ;[2541] YES
INS 48/121 ;10C8
;**;[2541] Add code to handle CPU failures and hung devices
DVIN.1: SKIPA T2,[HNGDEV] ;[2541] ADDRESS FOR HUNG DEVICE PROCESSING
DVIN.2: MOVEI T2,CPUDIE ;[2541] ADDRESS FOR DEAD CPU PROCESSING
SETZM JOBSTW(S1) ;[2541] MAKE STREAM RUNNABLE
MOVE T1,J$RACS+P(J) ;[2541] GET STREAMS STACK
PUSH T1,T2 ;[2541] SAVE CONTINUATION ADDRESS
MOVEM T1,J$RACS+P(J) ;[2541] PUT STACK POINTER BACK
HRRZ T1,STREAM ;[2541] GET STREAM NUMBER
CAIN S1,(T1) ;[2541] IN STREAM CONTEXT?
MOVEM T2,.PSVOP(S2) ;[2541] YES, SET INTERRUPT RETURN ADDRESS
$DEBRK ;[2541] DISMISS THE INTERRUPT
;**;[2541] Add hung device and CPU failure processing routines
HNGDEV: TDZA P1,P1 ;[2541] INDICATE HUNG DEVICE
CPUDIE: MOVEI P1,1 ;[2541] OR DEAD CPU
MOVE P2,STREAM ;[2541] GET STREAM NUMBER
MOVE J,JOBPAG(P2) ;[2541] SETUP JOB DATA BASE POINTER
MOVE S,J$RACS+S(J) ;[2541] GET STREAM FLAGS
TXO S,GOODBY+RQB+ABORT ;[2541] LITE BYEBYE BITS
MOVEM S,J$RACS+S(J) ;[2541] STORE THEM
MOVE S1,[[ASCIZ\Hung device\]
[ASCIZ\CPU failure\]](P1) ;[2541] GET WTO TEXT FOR DEVICE
$WTO (<^T/(S1)/ - job requeued>,<^R/.EQJBB(J)/>,@JOBOBA(P2)) ;[2541]
MOVE S1,J$LSER(J) ;[2541] GET DEVICE DISPATCH ADDRESS
MOVE S1,DNAME(S1) ;[2541] GET DEVICE NAME
SKIPN P1 ;[2541] HUNG DEVICE?
CAME S1,[SIXBIT\PTP\] ;[2541] YES, PAPER TAPE PUNCH?
TRNA ;[2541] NO TO EITHER
$WTO (<Papertape feed may be empty>,<^R/.EQJBB(J)/>,@JOBOBA(P2)) ;[2541] HUNG PUNCH
SKIPE S1,J$DIFN(J) ;[2541] RELEASE FILE
PUSHJ P,F%REL ;[2541] YES
PUSHJ P,QREQUE ;[2541] REQUEUE THE JOB
PUSHJ P,INTDCL ;[2541] TURN OFF PSI
PJRST SHUTUP ;[2541] SHUT DOWN THE STREAM
SUM 254410