Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - filfnd.c12
There are no other files named filfnd.c12 in the archive.
 REP 9/34	;12C1
		MOVSI	T1,UNPNNA##	;NO NEW ACCESS BIT
 WIT
	LCKSTR:	MOVSI	T1,UNPNNA##	;NO NEW ACCESS BIT
 INS 16/36	;12C2
		MOVSI	T1,UNPNNA##	;HAS STR BEEN LOCKED AGAINST NEW ACCESSES?
		TDNN	T1,UNIUST##(U)	;...
		PUSHJ	P,LCKSTR	;NO, DO SO NOW
		  JFCL			;SKIP RETURNS
		PUSHJ	P,WATIDL	;WAIT FOR STR TO BECOME IDLE
 REP 1/38	;12C3
	SUBTTL	STRUUO - UFD INTERLOCK
 WIT
	;ROUTINE TO BUMP UNIGEN OF ALL UNITS IN STR AND WAIT FOR STR
	;TO BECOME IDLE.
	;CALL:
	;	F/ STR DB ADDR
	WATIDL:	PUSHJ	P,BMPGEN	;BUMP GENERATION NUMBER OF ALL UNITS
		PUSH	P,F		;SAVE F
		SETZ	F,		;DON'T DIDDLE WITH EVM
		PUSHJ	P,GVCBJ		;GIVE UP THE CB SO OTHERS BLOCKED IN FILSER
					; CAN COMPLETE BEFORE WE RETURN
		POP	P,F		;RESTORE F
	;NOW WAIT FOR ALL UNITS TO BECOME IDLE
	WATID1:	HLRZ	U,STRUNI##(F)	;BACK TO FIRST UNIT
	WATID2:	SKIPE	UNIQUE##(U)	;ANYTHING QUEUED?
		JRST	WATID3		;YES, MUST WAIT A WHILE LONGER
		SKIPE	T1,UNISTS##(U)	;GET UNIT STATUS, SKIP IF UNIT IS IDLE
		CAIL	T1,OWCOD##	;SOME FLAVOR OF OPR WAIT?
		SKIPA			;IDLE OR IN OPR WAIT
		JRST	WATID3		;UNIT ISN'T IDLE
		HLRZ	U,UNISTR##(U)	;NEXT UNIT IN THIS STR
		JUMPN	U,WATID2	;LOOP FOR ALL
		PUSH	P,F		;SAVE F A BIT
		SETZ	F,		;DON'T DIDDLE WITH EVM
		PUSHJ	P,GETCB		;GET CB BACK
		JRST	FPOPJ##		;RETURN
	WATID3:	MOVEI	T1,1		;WAIT FOR A SECOND
		PUSHJ	P,SLEEPF##	;ZZZ
		JRST	WATID1		;CHECK AGAIN
	SUBTTL	STRUUO - UFD INTERLOCK

 INS 8/44	;12C4
		SETZM	UNISAB##(U)	;SAY WE'VE GIVEN BACK SAB
 REP 17/44	;12C5
		LDB	T1,UNYSPU##	;NUMBER OF WRDS IN SPT
		ADDI	T1,SPTFIR##+1	; + OVERHEAD
		PUSHJ	P,TSTGIV	;RETURN THE SPACE
		SETZM	UNISPT##(U)	;SAY WE'VE GIVEN BACK SPT + SAB
		POPJ	P,		;AND RETURN

	TSTGIV:
		MOVEI	T3,GIVWDS##	;ASSUME LOW CORE
 WIT
		JUMPE	T2,CPOPJ##	;JUMP IF NO SPT SET UP
		SETZM	UNISPT##(U)	;SAY WE'VE GIVEN BACK SPT
		LDB	T1,UNYSPU##	;NUMBER OF WRDS IN SPT
		ADDI	T1,SPTFIR##+1	; + OVERHEAD
	;	PJRST	TSTGIV		;RETURN THE SPACE AND RETURN
	TSTGIV:	MOVEI	T3,GIVWDS##	;ASSUME LOW CORE
 SUM 149195