IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)    3300  HISTORY			; DETAILED

   (1)    4200  DECLARATIONS

   (4)     100  IOLOCKPAG - LOCK INDIVIDUAL PAGE FOR I/O

   (6)     100  UNLOCK PAGES AT COMPLETION OF I/O

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   1

X0205                                                                                                                            (1)



                                     0000   100 	.TITLE	IOLOCK - LOCK AND UNLOCK PAGES FOR I/O

                                     0000   200 	.IDENT	/X0205/

                                     0000   300 ;

                                     0000   400 ; COPYRIGHT (C) 1978

                                     0000   500 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000   600 ;

                                     0000   700 ; THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

                                     0000   800 ; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

                                     0000   900 ; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

                                     0000  1000 ; MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

                                     0000  1100 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

                                     0000  1200 ; TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

                                     0000  1300 ; REMAIN IN DEC.

                                     0000  1400 ;

                                     0000  1500 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

                                     0000  1600 ; AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

                                     0000  1700 ; CORPORATION.

                                     0000  1800 ;

                                     0000  1900 ; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

                                     0000  2000 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000  2100 

                                     0000  2200 ;++

                                     0000  2300 ; FACILITY:	EXECUTIVE, MEMORY MANAGEMENT SUBROUTINES

                                     0000  2400 ;

                                     0000  2500 ; ABSTRACT:	THIS MODULE PROVIDES THE ROUTINE FOR QI/O TO LOCK DOWN

                                     0000  2600 ;	THE PAGES BEING TRANSFERRED AND THE ROUTINE REQUIRED BY THE I/O

                                     0000  2700 ;	COMPLETION LOGIC TO UNLOCK THOSE PAGES.

                                     0000  2800 ;

                                     0000  2900 ; ENVIRONMENT:	KERNEL MODE

                                     0000  3000 ;

                                     0000  3100 ;--

                                     0000  3200 ;

                                     0000  3300 	.SBTTL	HISTORY			; DETAILED

                                     0000  3400 ;

                                     0000  3500 ; AUTHOR: PETER H. LIPMAN	, CREATION DATE: 17-SEP-76

                                     0000  3600 ;

                                     0000  3700 ; MODIFIED BY:

                                     0000  3800 ;	, : VERSION

                                     0000  3900 ; 01	 -

                                     0000  4000 

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   2

X0205           DECLARATIONS                                                                                                     (1)



                                     0000  4200 	.SBTTL	DECLARATIONS

                                     0000  4300 

                                     0000  4400 ;

                                     0000  4500 ; INCLUDE FILES:

                                     0000  4600 ;

                                     0000  4700 	$IPLDEF				;PRIORITY LEVEL DEFINITIONS

                                     0000  4800 	$PCBDEF				;PROCESS CONTROL BLOCK DEFINITIONS

                                     0000  4900 	$PFNDEF				;PFN DATA BASE DEFINITIONS

                                     0000  5000 	$PHDDEF				;PROCESS HEADER DEFINITIONS

                                     0000  5100 	$PRDEF				;PROCESSOR REGISTER DEFINITIONS

                                     0000  5200 	$PTEDEF				;PAGE TABLE ENTRY DEFINTIONS

                                     0000  5300 	$SSDEF				;SYSTEM STATUS DEFINITIONS

                                     0000  5400 	$VADEF				;VIRTUAL ADDRESS VIELDS

                                     0000  5500 	$WSLDEF				;WORKING SET LIST DEFINITIONS

                                     0000  5600 ;

                                     0000  5700 ; EXTERNAL SYMBOLS:

                                     0000  5800 ;

                                     0000  5900 

                                     0000  6000 ;

                                     0000  6100 ; MACROS:

                                     0000  6200 ;

                                     0000  6300 

                                     0000  6400 ;

                                     0000  6500 ; EQUATED SYMBOLS:

                                     0000  6600 ;

                                     0000  6700 

                                     0000  6800 ;

                                     0000  6900 ; OWN STORAGE:

                                     0000  7000 ;

                                     0000  7100 ;

                                     0000  7200 ; **********************************************************************

                                     0000  7300 ;

                                     0000  7400 ; **************** THIS ENTIRE MODULE MUST BE RESIDENT *****************

                                     0000  7500 ;

                                 00000000  7600 	.PSECT	$MMGCOD

                                     0000  7700 ;

                                     0000  7800 ; **********************************************************************

                                     0000  7900 ;

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   3

X0205           DECLARATIONS                                                                                                     (2)



                                     0000   100 ;++

                                     0000   200 ; FUNCTIONAL DESCRIPTION:

                                     0000   300 ;

                                     0000   400 ;	IOLOCK ACCEPTS A VIRTUAL ADDRESS AND BYTE COUNT OF AN I/O BUFFER

                                     0000   500 ;	AND A DIRECTION OF TRANSFER INDICATOR.  THE SPECIFIED PAGES

                                     0000   600 ;	ARE MADE RESIDENT AND MARKED MODIFIED IF APPROPRIATE, AND THEN

                                     0000   700 ;	THEY ARE LOCKED INTO MEMORY BY INCREMENTING THEIR REFERENCE COUNTS.

                                     0000   800 ;

                                     0000   900 ; CALLING SEQUENCE:

                                     0000  1000 ;

                                     0000  1100 ;	BSBW	MMG$IOLOCK

                                     0000  1200 ;

                                     0000  1300 ;

                                     0000  1400 ; INPUT PARAMETERS:

                                     0000  1500 ;

                                     0000  1600 ;	R0 = VIRTUAL ADDRESS OF BEGINNING OF BUFFER

                                     0000  1700 ;	R1 = SIZE OF BUFFER IN BYTES

                                     0000  1800 ;	R2 = TRANSFER DIRECTION INDICATOR

                                     0000  1900 ;		0 = WRITE OUT OF MEMORY TO I/O DEVICE

                                     0000  2000 ;		1 = READ INTO MEMORY FROM I/O DEVICE

                                     0000  2100 ;	R4 = CURRENT PROCESS PCB ADDRESS

                                     0000  2200 ;

                                     0000  2300 ;	IPL MUST BE AT ASTDEL

                                     0000  2400 ;

                                     0000  2500 ; IMPLICIT INPUTS:

                                     0000  2600 ;

                                     0000  2700 ;	NONE

                                     0000  2800 ;

                                     0000  2900 ; OUTPUT PARAMETERS:

                                     0000  3000 ;

                                     0000  3100 ;	IF SUCCESSFUL

                                     0000  3200 ;		R0 = #SS$_NORMAL (LOW BIT SET)

                                     0000  3300 ;		R1 = SYSTEM VIRTUAL ADDRESS OF FIRST PAGE TABLE ENTRY

                                     0000  3400 ;

                                     0000  3500 ;	IF NOT SUCCESSFUL

                                     0000  3600 ;		R0 = 0

                                     0000  3700 ;		R1 = VIRTUAL ADDRESS TO FAULT AND TRY AGAIN

                                     0000  3800 ;	   OR

                                     0000  3900 ;		R0 = SYSTEM STATUS CODE (LOW BIT CLEAR)

                                     0000  4000 ;

                                     0000  4100 ; IMPLICIT OUTPUTS:

                                     0000  4200 ;

                                     0000  4300 ;	NONE

                                     0000  4400 ;

                                     0000  4500 ; COMPLETION CODES:

                                     0000  4600 ;

                                     0000  4700 ;	SS$_INSFWSL			;INSUFICIENT WORKING SET LIMIT

                                     0000  4800 ;

                                     0000  4900 ; SIDE EFFECTS:

                                     0000  5000 ;

                                     0000  5100 ;	NONE

                                     0000  5200 ;

                                     0000  5300 ;--

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   4

X0205           DECLARATIONS                                                                                                     (3)



                                     0000   100 ;

                                     0000   200 ; ACCESS VIOLATION - ATTEMPTED I/O REQUEST TO BALANCE SET SLOTS

                                     0000   300 ;

                                     0000   400 	.ENABL	LSB

                                     0000   500 IOLOCKACCVIO:

            50            0C     3C  0000   600 	MOVZWL	#SS$_ACCVIO,R0		;STATUS CODE FOR ACCESS VIOLATION

                          05     11  0003   700 	BRB	10$

                                     0005   800 ;

                                     0005   900 ; NUMBER OF PAGES REQUIRED EXCEEDS THE DYNAMIC SIZE OF THE WORKING SET

                                     0005  1000 ;

                                     0005  1100 TOOMANYPAGES:

            50       011C 8F     3C  0005  1200 	MOVZWL	#SS$_INSFWSL,R0		;INSUFFICIENT WORKING SET LIMIT

                          50     DD  000A  1300 10$:	PUSHL	R0			;SO THAT THE POPR WILL BE RIGHT

                          00A0   31  000C  1400 	BRW	IOLOCKEXIT

                                     000F  1500 

                                     000F  1600 	.DSABL	LSB

                                     000F  1700 

                                     000F  1800 MMG$IOLOCK::

                     00F0 8F     BB  000F  1900 	PUSHR	#^M<R4,R5,R6,R7>

            57            52     D0  0013  2000 	MOVL	R2,R7			;DIRECTION INDICATOR

            09            00     EF  0016  2100 	EXTZV	#VA$V_BYTE,#VA$S_BYTE,R0,R6 ;STARTING BYTE IN PAGE

            56            50         0019       

                          03     12  001B  2200 	BNEQ	10$			;BRANCH IF PARTIAL PAGE

            57            02     C8  001D  2300 	BISL	#2,R7			;FIRST PAGE IS FULL PAGE

                                     0020  2400 					;UNLESS IT IS ALSO THE LAST

            55   00000000'9F     D0  0020  2500 10$:	MOVL	@#CTL$GL_PHD,R5		;P1 SPACE ADDRESS OF PROCESS HEADER

            50            56     C3  0027  2600 	SUBL3	R6,R0,R3		;R3 = PAGE ALLIGNED VA

                          53         002A       

            52            7041   9E  002B  2700 	MOVAB	-(R0)[R1],R2		;R2=LAST BYTE INCLUSIVE

                          17     18  002F  2800 	BGEQ	20$			;BRANCH IF PROCESS VA

            53            1F     E1  0031  2900 	BBC	#31,R3,IOLOCKACCVIO	;ENTIRE RANGE MUST BE SYSTEM SPACE

                          CB         0034       

       0000'CF            52     D1  0035  3000 	CMPL	R2,W^SWP$GL_BALBASE	;AND BELOW BALANCE SET SLOTS

                          C4     1E  003A  3100 	BGEQU	IOLOCKACCVIO		;BRANCH IF NOT

            54       0000'CF     DE  003C  3200 	MOVAL	W^MMG$AL_SYSPCB,R4	;USE SYSTEM PCB

            55         64 A4     D0  0041  3300 	MOVL	PCB$L_PHD(R4),R5	;AND SYSTEM PHD

            53            02     90  0045  3400 	MOVB	#WSL$C_SYSTEM,R3	;SET SYSTEM PAGE TYPE

            51            56     C0  0048  3500 20$:	ADDL	R6,R1			;BYTE COUNT + OFFSET

            51         F7 8F     78  004B  3600 	ASHL	#-9,R1,R6		;PAGE COUNT NOT INCLUDING LAST

                          56         004F       

                                     0050  3700 					;PARTIAL PAGE IF ANY

            51       01FF 8F     B3  0050  3800 	BITW	#VA$M_BYTE,R1		;IS LAST PAGE A PARTIAL PAGE?

                          06     13  0055  3900 	BEQL	30$			;BRANCH IF NOT

                          56     D6  0057  4000 	INCL	R6			;COUNT ONE MORE PAGE

            57            1F     E2  0059  4100 	BBSS	#31,R7,30$		;SET 'LAST PARTIAL PAGE' INDICATOR

                          00         005C       

         12 A5         0E A5     A3  005D  4200 30$:	SUBW3	PHD$W_WSDYN(R5),PHD$W_WSLAST(R5),R0 ;CALCULATE THE NUMBER

                          50         0062       

            50            56     B1  0063  4300 	CMPW	R6,R0			;MAKE SURE THERE IS ENOUGH FOR REQUEST

                          9D     18  0066  4400 	BGEQ	TOOMANYPAGES		;BRANCH IF NOT ENOUGH

            53            52     CD  0068  4500 	XORL3	R2,R3,R0		;ARE FIRST AND LAST ADDRESSES

                          50         006B       

            50         F0 8F     78  006C  4600 	ASHL	#-16,R0,R0		;IN THE SAME PAGE TABLE?

                          50         0070       

                          0F     13  0071  4700 	BEQL	40$			;BRANCH IF YES

            57            1E     E2  0073  4800 	BBSS	#30,R7,35$		;NOTE TWO PAGE TABLES

                          00         0076       

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   5

X0205           DECLARATIONS                                                                                                     (3)



                          53     DD  0077  4900 35$:	PUSHL	R3			;SAVE START VA

                          FF84'  30  0079  5000 	BSBW	MMG$LOCKPGTB		;REFERENCE AND LOCK 2ND PAGE TABLE

                                     007C  5100 					;RETURNS SVAPTE AND RAISES TO SYNCH

                                     007C  5200 	SETIPL	#IPL$_ASTDEL		;BACK TO ASTDEL IN ORDER TO FAULT 1ST PT

            53            8E     D0  007F  5300 	MOVL	(SP)+,R3		;RESTORE STARTING VIRTUAL ADDRESS

            52            53     D0  0082  5400 40$:	MOVL	R3,R2			;STARTING VIRTUAL ADDRESS

                          FF78'  30  0085  5500 	BSBW	MMG$LOCKPGTB		;REFERENCE AND LOCK 1ST PAGE TABLE

                                     0088  5600 					;RETURNS SVAPTE IN R3, IPL=SYNCH

            55         64 A4     D0  0088  5700 	MOVL	PCB$L_PHD(R4),R5	;NO LONGER SWAPPABLE, USE SYSTEM ADR OF PHD

                          53     DD  008C  5800 	PUSHL	R3			;AND SAVE IT FOR RETURN TO CALLER

                          03     11  008E  5900 	BRB	55$			;START AFTER THE 'INC' SVAPTE

                                     0090  6000 ;

                                     0090  6100 ; 0(SP) = STARTING SYS VIRTUAL ADDRESS OF PAGE TABLE ENTRY

                                     0090  6200 ; R6 = PAGE COUNT TO LOOP THROUGH

                                     0090  6300 ; R7<0>  - SET IF READING INTO MEMORY

                                     0090  6400 ; R7<1>  - SET IF TRANSFERRING THE ENTIRE PAGE

                                     0090  6500 ; R7<30> - SET IF 2 PAGE TABLES WERE LOCKED

                                     0090  6600 ; R7<31> - SET IF LAST PAGE IS PARTIAL PAGE

                                     0090  6700 ;

            53            04     C0  0090  6800 50$:	ADDL	#4,R3			;NEXT PAGE TABLE ENTRY ADDRESS

            57            1F     E1  0093  6900 55$:	BBC	#31,R7,60$		;BRANCH IF LAST PAGE IS A FULL PAGE

                          08         0096       

            01            56     D1  0097  7000 	CMPL	R6,#1			;IS THIS THE LAST PAGE?

                          03     14  009A  7100 	BGTR	60$			;BRANCH IF NOT

            57            02     CA  009C  7200 	BICL	#2,R7			;INDICATE PARTIAL PAGE

                          40     10  009F  7300 60$:	BSBB	MMG$IOLOCKPAG		;LOCK THIS PAGE FOR I/O

            13            50     E9  00A1  7400 	BLBC	R0,FAULTREQUIRED	;BRANCH IF MUST PAGE FAULT

            57            02     C8  00A4  7500 	BISL	#2,R7			;AFTER FIRST PAGE, FULL PAGES

            52       0200 C2     DE  00A7  7600 	MOVAL	^X200(R2),R2		;NEXT VIRTUAL PAGE

            E1            56     F5  00AC  7700 	SOBGTR	R6,50$			;ONCE FOR EACH PAGE

                                     00AF  7800 ;

                                     00AF  7900 ; R0 = STATUS CODE

                                     00AF  8000 ;

                                     00AF  8100 IOLOCKEXIT:

                     00F2 8F     BA  00AF  8200 	POPR	#^M<R1,R4,R5,R6,R7>	;RESTORE REGISTERS AND RETURN R1

                                     00B3  8300 					;WITH SVAPTE IF SUCCESSFUL

                                     00B3  8400 					;OR VA TO FAULT IF NOT

                                     00B3  8500 	SETIPL	#IPL$_ASTDEL		;RETURN WITH IPL AS CALLED

                                 05  00B6  8600 	RSB

                                     00B7  8700 ;

                                     00B7  8800 ; FAILED TO LOCK THE PAGE FOR I/O, IT MUST BE PAGE FAULTED FIRST

                                     00B7  8900 ; R3 = SVAPTE OF FIRST PAGE NOT LOCKED

                                     00B7  9000 ;

                                     00B7  9100 FAULTREQUIRED:

                          53     DD  00B7  9200 	PUSHL	R3			;SAVE PTE ADR OF PAGE NOT LOCKED

            53         04 AE     D0  00B9  9300 	MOVL	4(SP),R3		;SVAPTE OF 1ST PAGE

                          FF40'  30  00BD  9400 	BSBW	MMG$DECPTREF		;UNLOCK THE 1ST PAGE TABLE

            57            1E     E1  00C0  9500 	BBC	#30,R7,10$		;BRANCH IF ONLY ONE PAGE TABLE

                          08         00C3       

            53       0200 C3     DE  00C4  9600 	MOVAL	^X200(R3),R3		;ADR OF PTE IN NEXT PAGE TABLE

                          FF34'  30  00C9  9700 	BSBW	MMG$DECPTREF		;UNLOCK THE 2ND PAGE TABLE

                          0A     BA  00CC  9800 10$:	POPR	#^M<R1,R3>		;R1 = 1ST PTE NOT LOCKED, R3 = 1ST PTE

                          52     DD  00CE  9900 	PUSHL	R2			;SAVE VIRTUAL ADDRESS OF BE FAULTED

            51            53     C2  00D0 10000 	SUBL	R3,R1			;# OF BYTES OF PTE TO UNLOCK

                          08     13  00D3 10100 	BEQL	20$			;BRANCH IF NONE TO UNLOCK

            51         FE 8F     78  00D5 10200 	ASHL	#-2,R1,R1		;NUMBER OF PTE'S TO UNLOCK

                          51         00D9       

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   6

X0205           DECLARATIONS                                                                                                     (3)



                          00F6   30  00DA 10300 	BSBW	MMG$UNLOCK1		;UNLOCK EVERYTHING THAT WAS LOCKED

                          50     D4  00DD 10400 20$:	CLRL	R0			;RETURN STATUS INDICATING

                          CE     11  00DF 10500 	BRB	IOLOCKEXIT		;"PAGE FAULT AND TRY AGAIN"

                                     00E1 10600 

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   7

X0205           IOLOCKPAG - LOCK INDIVIDUAL PAGE FOR I/O                                                                         (4)



                                     00E1   100 	.SBTTL	IOLOCKPAG - LOCK INDIVIDUAL PAGE FOR I/O

                                     00E1   200 ;++

                                     00E1   300 ; FUNCTIONAL DESCRIPTION:

                                     00E1   400 ;

                                     00E1   500 ;	THIS ROUTINE LOCKS THE SPECIFIED PAGE FOR I/O.

                                     00E1   600 ; TO ACCOMPLISH THIS IT MUST MAKE THE PAGE VALID, EFFECTIVELY BY

                                     00E1   700 ; FAULTING THE PAGE.  BUT SINCE THIS ROUTINE DOES NOT WANT TO WAIT

                                     00E1   800 ; FOR A PAGE TO FAULT, IT WILL ONLY MAKE THE PAGE VALID IF IT CAN

                                     00E1   900 ; DO SO WITHOUT WAITING.  OTHERWISE IT PASSES BACK THE CONDITION

                                     00E1  1000 ; THAT A FULL FLEDGED PAGE FAULT IS REQUIRED TO GET THE PAGE.

                                     00E1  1100 ;

                                     00E1  1200 ;	IOLOCKPAG RECOGNIZES THE SPECIAL CASE OF A NON-RESIDENT

                                     00E1  1300 ; PAGE THAT IS GOING TO BE TOTALLY OVERWRITTEN BY THE I/O TRANSFER.

                                     00E1  1400 ; IN THIS CASE IT DEMAND ZEROES A PAGE INSTEAD OF READING IT IN.

                                     00E1  1500 ;

                                     00E1  1600 ; CALLING SEQUENCE:

                                     00E1  1700 ;

                                     00E1  1800 ;	BSBW	MMG$IOLOCKPAG

                                     00E1  1900 ;

                                     00E1  2000 ; INPUT PARAMETERS:

                                     00E1  2100 ;

                                     00E1  2200 ;	R2 = VIRTUAL ADDRESS (LOW 9 BITS = PAGTYP)

                                     00E1  2300 ;	     ONLY PROCESS OR SYSTEM PAGES, NO GLOBALS YET

                                     00E1  2400 ;	R3 = SYSTEM VIRTUAL ADDRESS OF PAGE TABLE ENTRY

                                     00E1  2500 ;	R4 = PROCESS CONTROL BLOCK ADDRESS

                                     00E1  2600 ;	R5 = PROCESS HEADER ADDRESS (SYSTEM SPACE)

                                     00E1  2700 ;	R7 = <0> - SET IF MODIFYING THE PAGE (READING INTO MEMORY)

                                     00E1  2800 ;	     <1> - SET IF TRANSFERRING THE ENTIRE PAGE

                                     00E1  2900 ;	     <2:7> = 0

                                     00E1  3000 ;	IPL = SYNCH

                                     00E1  3100 ;

                                     00E1  3200 ; IMPLICIT INPUTS:

                                     00E1  3300 ;

                                     00E1  3400 ;	NONE

                                     00E1  3500 ;

                                     00E1  3600 ; OUTPUT PARAMETERS:

                                     00E1  3700 ;

                                     00E1  3800 ;	R0 = #SS$_NORMAL IF LOCKED OK

                                     00E1  3900 ;	   = 0 IF PAGE FAULT REQUIRED

                                     00E1  4000 ;	R2,R3 PRESERVED

                                     00E1  4100 ;

                                     00E1  4200 ; IMPLICIT OUTPUTS:

                                     00E1  4300 ;

                                     00E1  4400 ;	NONE

                                     00E1  4500 ;

                                     00E1  4600 ; COMPLETION CODES:

                                     00E1  4700 ;

                                     00E1  4800 ;	NONE

                                     00E1  4900 ;

                                     00E1  5000 ; SIDE EFFECTS:

                                     00E1  5100 ;

                                     00E1  5200 ;	NONE

                                     00E1  5300 ;

                                     00E1  5400 ;--

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   8

X0205           IOLOCKPAG - LOCK INDIVIDUAL PAGE FOR I/O                                                                         (5)



                                     00E1   100 MMG$IOLOCKPAG::

                                     00E1   150 	.ENABL	LSB

            63   7B800000 8F     CB  00E1   200 	BICL3	#^C<PTE$M_VALID		-;CHECK VALID BIT

                          50         00E8       

                                     00E9   300 		! PTE$M_TYP1 ! PTE$M_TYP0 -;GET PTE TYPE BITS

                                     00E9   400 		! PTE$M_PGFLVB>,(R3),R0	;AND PFN/PAGE FILE VBN BITS TO R0

                          1C     18  00E9   500 	BGEQ	NOTVALID		;BRANCH IF PAGE NOT VALID

                                     00EB   600 ;

                                     00EB   700 ; PAGE IS VALID, LOCK IT FOR I/O

                                     00EB   800 ;

            15            00     EF  00EB   900 	EXTZV	#PTE$V_PFN,#PTE$S_PFN,R0,R0 ;R0=PFN

            50            50         00EE       

       0000'CF            50     D1  00F0   950 	CMPL	R0,W^MMG$GL_MAXPFN	;DOES THIS PAGE HAVE PFN DATABASE?

                          0C     14  00F5   975 	BGTR	10$			;NO, SKIP LOCK FOR PAGE

                                     00F7  1000 LOCKPAGE:

                     0000'DF40   B6  00F7  1100 	INCW	@W^PFN$AW_REFCNT[R0]	;I/O REFERENCE

            04            57     E9  00FC  1200 	BLBC	R7,10$			;BRANCH IF NOT MODIFYING PAGE

         03 A3            04     88  00FF  1300 	BISB	#PTE$M_MODIFY@-24,3(R3)	;SET MODIFY BIT IN PTE

            50            01     3C  0103  1400 10$:	MOVZWL	#SS$_NORMAL,R0		;RETURN SUCCESS INDICATION

                                 05  0106  1500 	RSB

                                     0107  1550 	.DSABL	LSB

                                     0107  1600 ;

                                     0107  1700 ; PAGE NOT VALID

                                     0107  1800 ;

                                     0107  1900 NOTVALID:

                          63     13  0107  2000 	BEQL	DEMANDZERO		;BRANCH IF DEMAND ZERO PAGE

            05            16     EE  0109  2100 	EXTV	#PTE$V_TYP0,#<PTE$V_TYP1+1-PTE$V_TYP0>,R0,R1

            51            50         010C       

                                     010E  2200 ;

                                     010E  2300 ; R1 = SIGN EXTENDED VIELD OF BITS BETWEEN TYP0 AND TYP1

                                     010E  2400 ; IF R1 = 0 THEN BOTH BITS WERE ZERO

                                     010E  2500 ; R1 NEGATIVE INDICATES TYP1 BIT SET

                                     010E  2600 ; R1<0> IS THE TYP0 BIT

                                     010E  2700 ;

                          55     12  010E  2800 	BNEQ	NOTRANSITION		;BRANCH IF NOT TRANSITION PAGE

                                     0110  2900 ;

                                     0110  3000 ; PAGE IS IN TRANSITION, R0 = PFN

                                     0110  3100 ;

                                     0110  3110 	ASSUME	PFN$C_ACTIVE EQ 7	;ALL BITS SET

            07       0000'DF40   8B  0110  3120 	BICB3	@W^PFN$AB_STATE[R0],#PFN$C_ACTIVE,R1 ;IS PAGE ACTIVE?

                          51         0116       

                          3F     13  0117  3130 	BEQL	ACTIVE			;BRANCH IF IT IS

                          0D     BB  0119  3200 	PUSHR	#^M<R0,R2,R3>		;SAVE SVAPTE, VA, PFN

                          FEE2'  30  011B  3300 	BSBW	MMG$FREWSLE		;GET A WORKING SET LIST ENTRY

            1F            50     E9  011E  3400 	BLBC	R0,30$			;BRANCH IF MUST WAIT FOR ONE

                          01     BA  0121  3500 	POPR	#^M<R0>			;RECOVER PFN

            03            00     EF  0123  3600 	EXTZV	#PFN$V_LOC,#PFN$S_LOC,@W^PFN$AB_STATE[R0],R2 ;LOCATION

            52       0000'DF40       0126       

                                     012B  3700 	CASE	R2,<-

                                     012B  3800 		PFNLIST,-		;FREE PAGE LSIT

                                     012B  3900 		PFNLIST,-		;MODIFIED PAGE LIST

                                     012B  4000 		20$,-			;BAD PAGE LIST

                                     012B  4100 		RELEASEPEND,-		;PAGE WAITING TO BE RELEASED BY I/O DONE

                                     012B  4200 		20$,-			;READ ERROR

                                     012B  4300 		WRITEINPROG-		;WRITE IN PROGRESS

                                     012B  4400 	>

            52            8E     7D  013B  4500 20$:	MOVQ	(SP)+,R2		;RESTORE VA AND SVAPTE

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page   9

X0205           IOLOCKPAG - LOCK INDIVIDUAL PAGE FOR I/O                                                                         (5)



                          22     11  013E  4600 	BRB	MUSTFAULT		;RETURN "MUST FAULT" STATUS

                          01     BA  0140  4700 30$:	POPR	#^M<R0>			;CLEAN OFF SAVED PFN

                          F7     11  0142  4800 	BRB	20$			;AND JOIN MUST FAULT CODE

                                     0144  5300 ;

                                     0144  5400 ; PAGE IS ON FREE OR MODIFIED PAGE LIST, R2 = LIST ID

                                     0144  5500 ;

                                     0144  5600 PFNLIST:

                          FEB9'  30  0144  5700 	BSBW	MMG$REMPFN		;REMOVE PAGE FROM SPECIFIED LIST

                                     0147  5750 WRITEINPROG:

                                     0147  5800 RELEASEPEND:

            52            6E     7D  0147  5900 	MOVQ	(SP),R2			;RESTORE VA AND SVAPTE

                          FEB3'  30  014A  6000 	BSBW	MMG$MAKEWSLE		;MAKE NEW WORKING SET LIST ENTRY

            52            8E     7D  014D  6100 	MOVQ	(SP)+,R2		;RESTORE VA AND SVAPTE

                                     0150  6400 	ASSUME	PFN$V_DELCON EQ PFN$V_LOC+PFN$S_LOC+1 ;DELCON IS 2ND BIT TO LEFT OF LOC

                                     0150  6480 					;BIT IN BETWEEN IS FOR LOC EXPANSION

            00            07     F0  0150  6560 	INSV	#PFN$C_ACTIVE,#PFN$V_LOC,#PFN$S_LOC+2,- ;SET PAGE ACTIVE

                                     0153       

       0000'DF40          05         0153  6640 		@W^PFN$AB_STATE[R0]	;AND CLEAR DELCON

                                     0158  6680 ACTIVE:

            63            1F     E3  0158  6720 	BBCS	#PTE$V_VALID,(R3),LOCKPAGE ;SET VALID BIT

                          9B         015B       

                          99     11  015C  6800 	BRB	LOCKPAGE		;FINISH UP BY LOCKING THE PAGE

                                     015E  6900 ;

                                     015E  7000 ; RESTORE VA AND SVAPTE AND FALL THROUGH TO MUSTFAULT1

                                     015E  7100 ;

                                     015E  7200 MUSTFAULT3:

                          0C     BA  015E  7300 	POPR	#^M<R2,R3>		;RESTORE VA AND SVAPTE

                                     0160  7400 ;

                                     0160  7500 ; POP 1 LONG WORD AND RETURN "MUST FAULT" INDICATION

                                     0160  7600 ;

                                     0160  7700 MUSTFAULT1:

                          8E     D5  0160  7800 	TSTL	(SP)+			;CLEAN UP STACK

                                     0162  7900 ;

                                     0162  8000 ; RETURN "MUST FAULT" INDICATION

                                     0162  8100 ;

                                     0162  8200 MUSTFAULT:

                          50     D4  0162  8300 	CLRL	R0			;INDICATE FAILURE

                                 05  0164  8400 	RSB				;

                                     0165  8500 ;

                                     0165  8600 ; MUST BE SECTION, PAGE FILE, OR GLOBAL PAGE

                                     0165  8700 ;

                                     0165  8800 NOTRANSITION:

                          FB     14  0165  8900 	BGTR	MUSTFAULT		;FAULT GLOBALS FOR NOW

                                     0167  9000 ;

                                     0167  9100 ; PAGE IS A SECTION OR PAGE FILE PAGE.  IF TOTALLY OVERWRITING IT

                                     0167  9200 ; THEN SUPPLY A ZEROED PAGE INSTEAD OF FAULTING IT IN.

                                     0167  9300 ;

            57            03     91  0167  9400 	CMPB	#3,R7			;TOTALLY OVERWRITING THE PAGE?

                          F6     12  016A  9500 	BNEQ	MUSTFAULT		;BRANCH IF NOT, NEED TO READ IT

                                     016C  9600 ;

                                     016C  9700 ; DEMAND ZERO THIS PAGE, R0 IS BACKING STORE ADDRESS.

                                     016C  9800 ;

                                     016C  9900 DEMANDZERO:

            17            00     EF  016C 10000 	EXTZV	#PFN$V_BAK,#PFN$S_BAK,R0,R0 ;CALCULATE BACKING STORE ADR

            50            50         016F       

            50            16     E1  0171 10100 	BBC	#PTE$V_TYP0,R0,20$	;BRANCH IF PAGING FILE

                          06         0174       

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page  10

X0205           IOLOCKPAG - LOCK INDIVIDUAL PAGE FOR I/O                                                                         (5)



            50            10     E1  0175 10200 	BBC	#PTE$V_CRF,R0,30$	;BRANCH IF NOT CRF SECTION

                          08         0178       

                          50     D4  0179 10300 	CLRL	R0			;NULL PAGING FILE FOR CRF SECTION

            18         1F A5     F0  017B 10400 20$:	INSV	PHD$B_PAGFIL(R5),#PFN$V_PGFLX,#PFN$S_PGFLX,R0 ;PAGE FILE INDEX

            50            08         017F       

                          50     DD  0181 10500 30$:	PUSHL	R0			;SAVE BACKING STORE ADDRESS

            7E            52     7D  0183 10600 	MOVQ	R2,-(SP)		;SAVE SVAPTE AND VA

                          FE77'  30  0186 10700 	BSBW	MMG$FREWSLE		;GET A WORKING SET LIST ENTRY

            52            6E     7D  0189 10800 	MOVQ	(SP),R2			;RESTORE VA AND SVAPTE

            CF            50     E9  018C 10900 	BLBC	R0,MUSTFAULT3		;BRANCH IF NEED TO WAIT FOR WSLE

                          FE6E'  30  018F 11000 	BSBW	MMG$ININEWPFN		;ALLOCATE AND INIT A PFN

            52            8E     7D  0192 11100 	MOVQ	(SP)+,R2		;RESTORE VA AND SVAPTE

            50            1F     E0  0195 11200 	BBS	#31,R0,MUSTFAULT1	;BRANCH IF MUST WAIT FOR ONE

                          C7         0198       

                     0000'DF40   B6  0199 11300 	INCW	@W^PFN$AW_REFCNT[R0]	;2ND REFERENCE FOR I/O LOCK DOWN

       0000'DF40          07     88  019E 11400 	BISB	#PFN$C_ACTIVE,@W^PFN$AB_STATE[R0] ;PAGE IS ACTIVE

       0000'DF40          8E     D0  01A4 11500 	MOVL	(SP)+,@W^PFN$AL_BAK[R0]	;SET BACKING STORE ADDRESS

            63   867FFFFF 8F     CB  01AA 11600 	BICL3	#^C<PTE$M_PROT ! PTE$M_OWN>,(R3),R1 ;GET PROT AND OWNER FROM PTE

                          51         01B1       

            51   84000000 8F     C8  01B2 11700 	BISL	#<PTE$M_VALID ! PTE$M_MODIFY>,R1 ;OR IN VALID AND MODIFY BITS

            51            50     C9  01B9 11800 	BISL3	R0,R1,(R3)		;AND STORE IT WITH THE PFN

                          63         01BC       

                                     01BD 11900 ;

                                     01BD 12000 ; AT THIS POINT DROP IPL TO ASTDEL SO SOMEONE ELSE MAY RUN IF NECESSARY

                                     01BD 12100 ; THE PROCESS HEADER HAS BEEN NAILED DOWN BY THE I/O REF COUNT ON THIS

                                     01BD 12200 ; PAGE SO IT CAN'T SLIP AWAY.

                                     01BD 12300 ;

                                     01BD 12400 	SETIPL	#IPL$_ASTDEL		;MAKE PROCESS SCHDEULABLE AGAIN

                          3C     BB  01C0 12500 	PUSHR	#^M<R2,R3,R4,R5>	;PRESERVE THESE FROM MOVC5

            62            00     2C  01C2 12600 	MOVC5	#0,(R2),#0,#^X200,(R2)	;ZERO THE PAGE

       0200 8F            00         01C5       

                          62         01C9       

                          3C     BA  01CA 12700 	POPR	#^M<R2,R3,R4,R5>	;RESTORE SAVED REGISTERS

                                     01CC 12800 	SETIPL	#IPL$_SYNCH		;BACK TO CALLED IPL

            50            01     3C  01CF 12900 	MOVZWL	#SS$_NORMAL,R0		;PAGE SUCCESSFULLY LOCKED FOR I/O

                                 05  01D2 13000 	RSB				;RETURN TO CALLER

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page  11

X0205           UNLOCK PAGES AT COMPLETION OF I/O                                                                                (6)



                                     01D3   100 	.SBTTL	UNLOCK PAGES AT COMPLETION OF I/O

                                     01D3   200 ;++

                                     01D3   300 ; FUNCTIONAL DESCRIPTION:

                                     01D3   400 ;

                                     01D3   500 ;	UNLOCK PAGES THAT WERE PREVIOUSLY LOCKED FOR DIRECT I/O

                                     01D3   600 ;

                                     01D3   700 ; CALLING SEQUENCE:

                                     01D3   800 ;

                                     01D3   900 ;	BSBW	MMG$UNLOCK

                                     01D3  1000 ;

                                     01D3  1100 ;

                                     01D3  1200 ; INPUT PARAMETERS:

                                     01D3  1300 ;

                                     01D3  1400 ;	R1 = PAGE COUNT

                                     01D3  1500 ;	R3 = STARTING SVAPTE

                                     01D3  1600 ;

                                     01D3  1700 ; IMPLICIT INPUTS:

                                     01D3  1800 ;	NONE

                                     01D3  1900 ;

                                     01D3  2000 ; OUTPUT PARAMETERS:

                                     01D3  2100 ;	NONE

                                     01D3  2200 ;

                                     01D3  2300 ; IMPLICIT OUTPUTS:

                                     01D3  2400 ;	NONE

                                     01D3  2500 ;

                                     01D3  2600 ; COMPLETION CODES:

                                     01D3  2700 ;	NONE

                                     01D3  2800 ;

                                     01D3  2900 ; SIDE EFFECTS:

                                     01D3  3000 ;	NONE

                                     01D3  3100 ;

                                     01D3  3200 ;--

                                     01D3  3300 	.ENABL	LSB

                                     01D3  3400 

                                     01D3  3500 MMG$UNLOCK1:

                                     01D3  3600 	SAVIPL				;CALLER'S IPL TO STACK

            52            53     D0  01D6  3700 	MOVL	R3,R2			;STARTING SVAPTE IN R2

                          27     11  01D9  3800 	BRB	10$			;JOIN COMMON CODE

                                     01DB  3900 MMG$UNLOCK::

                                     01DB  4000 	DSBINT	#IPL$_SYNCH		;SAVE IPL AND RAISE TO SYNCH

                          0A     BB  01E1  4100 	PUSHR	#^M<R1,R3>		;PUSH START SVAPTE, PAGE COUNT

                          FE1A'  30  01E3  4200 	BSBW	MMG$DECPTREF		;UNDO PAGE TABLE REFERENCE

            6E            01     C3  01E6  4300 	SUBL3	#1,(SP),R1		;NO. OF PAGES -1

                          51         01E9       

                          13     13  01EA  4400 	BEQL	5$			;OPTIMIZE SINGLE PAGE XFER

            53            6341   DE  01EC  4500 	MOVAL	(R3)[R1],R3		;SVAPTE OF LAST PAGE OF XFER

         04 AE            53     CD  01F0  4600 	XORL3	R3,4(SP),R1		;SAME PAGE TABLE?

                          51         01F4       

            51         F7 8F     78  01F5  4700 	ASHL	#-9,R1,R1		;IF HIGH BITS SAME, THEN YES

                          51         01F9       

                          03     13  01FA  4800 	BEQL	5$			;BRANCH IF SAME PAGE TABLE

                          FE01'  30  01FC  4900 	BSBW	MMG$DECPTREF		;UNDO REFERENCE FOR SECOND PAGE TABLE

            51            8E     7D  01FF  5000 5$:	MOVQ	(SP)+,R1		;RESTORE PAGE COUNT AND SVAPTE

            53            82     D0  0202  5100 10$:	MOVL	(R2)+,R3		;FETCH PAGE TABLE ENTRY

                          03     19  0205  5200 	BLSS	20$			;BRANCH IF VALID

                          FDF6'  30  0207  5300 	BSBW	IOC$PTETOPFN		;RETURN R3<PFN> = PFN

            15            00     EF  020A  5400 20$:	EXTZV	#PTE$V_PFN,#PTE$S_PFN,R3,R0 ;PFN TO R0

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page  12

X0205           UNLOCK PAGES AT COMPLETION OF I/O                                                                                (6)



            50            53         020D       

       0000'CF            50     D1  020F  5450 	CMPL	R0,W^MMG$GL_MAXPFN	;DOES THIS PAGE HAVE PFN DATABASE?

                          15     14  0214  5475 	BGTR	30$			;NO, NEXT PAGE

                                     0216  5500 	DECREF	GTR=30$			;ONE LESS REASON FOR THIS PAGE'S RESIDENCY

            7E            51     7D  0222  5600 	MOVQ	R1,-(SP)		;SAVE REGISTERS

                          FDD8'  30  0225  5700 	BSBW	MMG$RELPFN		;RELEASE THE PAGE

            51            8E     7D  0228  5800 	MOVQ	(SP)+,R1		;RESTORE REGISTERS

            D4            51     F5  022B  5900 30$:	SOBGTR	R1,10$			;ONCE AROUND FOR EACH PAGE

                                     022E  6000 	ENBINT				;RESTORE SAVED IPL

                                 05  0231  6100 	RSB

                                     0232  6200 ;

                                     0232  6300 ; PAGE REFERENCE OR SHARE COUNT WENT NEGATIVE, FATAL ERROR

                                     0232  6400 ;

                                     0232  6500 ; CALLING SEQUENCE:

                                     0232  6600 ;

                                     0232  6700 ;	BSBW	MMG$REFCNTNEG		;R0 = PAGE FRAME NUMBER

                                     0232  6800 ;	BSBW	MMG$SHRCNTNEG		;R0 = PAGE FRAME NUMBER

                                     0232  6900 ;

                                     0232  7000 MMG$REFCNTNEG::

                                     0232  7100 	BUG_CHECK REFCNTNEG,FATAL	;PFN REFERENCE COUNT NEGATIVE

                                     0236  7200 

                                     0236  7300 MMG$SHRCNTNEG::

                                     0236  7400 	BUG_CHECK SHRCNTNEG,FATAL	;PFN SHARE COUNT NEGATIVE

                                     023A  7500 

                                     023A  7600 	.END

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page  13

SYMBOL TABLE                                                                                                                     (6)



ACTIVE           00000158 R     03   PCB$L_PHD        00000064            PFN$C_ACTIVE   = 00000007            

BIT...         = 00000000            PCB$L_PHYPCB     00000018            PFN$C_BADPAGLST= 00000002            

BUG$_REFCNTNEG   ********   X   03   PCB$L_PID        00000060            PFN$C_FREPAGLST= 00000000            

BUG$_SHRCNTNEG   ********   X   03   PCB$L_PQB        0000004C            PFN$C_GBLWRT   = 00000003            

CTL$GL_PHD       ********   X   03   PCB$L_SQBL       00000004            PFN$C_GLOBAL   = 00000002            

DEMANDZERO       0000016C R     03   PCB$L_SQFL       00000000            PFN$C_GPGTBL   = 00000005            

FAULTREQUIRED    000000B7 R     03   PCB$L_STS        00000028            PFN$C_MFYPAGLST= 00000001            

GBL...         = 00000000            PCB$L_UIC        00000020            PFN$C_PPGTBL   = 00000004            

IOC$PTETOPFN     ********   X   03   PCB$L_WSSWP      00000024            PFN$C_PROCESS  = 00000000            

IOLOCKACCVIO     00000000 R     03   PCB$L_WTIME      0000002C            PFN$C_RDERR    = 00000004            

IOLOCKEXIT       000000AF R     03   PCB$T_LNAME      0000006C            PFN$C_RDINPROG = 00000006            

IPL$_ASTDEL    = 00000002            PCB$V_ASTPEN   = 00000011            PFN$C_RELPEND  = 00000003            

IPL$_HWCLK     = 00000018            PCB$V_BATCH    = 0000000E            PFN$C_SYSTEM   = 00000001            

IPL$_IOPOST    = 00000004            PCB$V_DELPEN   = 00000001            PFN$C_WRTINPROG= 00000005            

IPL$_MAILBOX   = 0000000B            PCB$V_FORCPEN  = 00000002            PFN$M_BADPAG   = 00000020            

IPL$_POWER     = 0000001F            PCB$V_HIBER    = 00000013            PFN$M_BAK      = 007FFFFF            

IPL$_QUEUEAST  = 00000006            PCB$V_INQUAN   = 00000003            PFN$M_COLLISION= 00000010            

IPL$_SCHED     = 00000003            PCB$V_LOGIN    = 00000014            PFN$M_DELCON   = 00000010            

IPL$_SYNCH     = 00000007            PCB$V_NETWRK   = 00000015            PFN$M_GBLBAK   = 00800000            

IPL$_TIMER     = 00000007            PCB$V_NOACNT   = 0000000F            PFN$M_LOC      = 00000007            

LOCKPAGE         000000F7 R     03   PCB$V_NODELET  = 00000017            PFN$M_MODIFY   = 00000080            

MMG$AL_SYSPCB    ********   X   03   PCB$V_PHDRES   = 00000012            PFN$M_PAGTYP   = 00000007            

MMG$DECPTREF     ********   X   03   PCB$V_PSWAPM   = 00000004            PFN$M_PGFLX    = FF000000            

MMG$FREWSLE      ********   X   03   PCB$V_PWRAST   = 00000016            PFN$M_RPTEVT   = 00000040            

MMG$GL_MAXPFN    ********   X   03   PCB$V_RES      = 00000000            PFN$S_BAK      = 00000017            

MMG$ININEWPFN    ********   X   03   PCB$V_RESPEN   = 00000005            PFN$S_GBLBAK   = 00000001            

MMG$IOLOCK       0000000F RG    03   PCB$V_SSFEXC   = 00000006            PFN$S_LOC      = 00000003            

MMG$IOLOCKPAG    000000E1 RG    03   PCB$V_SSFEXCE  = 00000007            PFN$S_PAGTYP   = 00000003            

MMG$LOCKPGTB     ********   X   03   PCB$V_SSFEXCS  = 00000008            PFN$S_PGFLX    = 00000008            

MMG$MAKEWSLE     ********   X   03   PCB$V_SSFEXCU  = 00000009            PFN$V_BADPAG   = 00000005            

MMG$REFCNTNEG    00000232 RG    03   PCB$V_SSRWAIT  = 0000000A            PFN$V_BAK      = 00000000            

MMG$RELPFN       ********   X   03   PCB$V_SUSPEN   = 0000000B            PFN$V_COLLISION= 00000004            

MMG$REMPFN       ********   X   03   PCB$V_SWPVBN   = 00000010            PFN$V_DELCON   = 00000004            

MMG$SHRCNTNEG    00000236 RG    03   PCB$V_WAKEPEN  = 0000000C            PFN$V_GBLBAK   = 00000017            

MMG$UNLOCK       000001DB RG    03   PCB$V_WALL     = 0000000D            PFN$V_LOC      = 00000000            

MMG$UNLOCK1      000001D3 R     03   PCB$W_APTCNT     00000034            PFN$V_MODIFY   = 00000007            

MUSTFAULT        00000162 R     03   PCB$W_ASTCNT     0000003C            PFN$V_PAGTYP   = 00000000            

MUSTFAULT1       00000160 R     03   PCB$W_BIOCNT     0000003E            PFN$V_PGFLX    = 00000018            

MUSTFAULT3       0000015E R     03   PCB$W_BIOLM      00000040            PFN$V_RPTEVT   = 00000006            

NOTRANSITION     00000165 R     03   PCB$W_BYTCNT     00000042            PFNLIST          00000144 R     03   

NOTVALID         00000107 R     03   PCB$W_BYTLM      00000068            PHD$B_ASTLVL     000000CF            

PCB$B_ASTACT     0000000C            PCB$W_DIOCNT     00000044            PHD$B_DFPFC      00000038            

PCB$B_ASTEN      0000000D            PCB$W_DIOLM      00000046            PHD$B_PAGFIL     0000001F            

PCB$B_PRI        0000000B            PCB$W_FILCNT     00000048            PHD$B_PGTBPFC    00000039            

PCB$B_PRIB       00000033            PCB$W_GPGCNT     00000038            PHD$C_LENGTH     00000118            

PCB$B_TYPE       0000000A            PCB$W_GRP        00000022            PHD$C_PHDPAGCTX= 00000008            

PCB$B_WEFC       00000032            PCB$W_MEM        00000020            PHD$K_LENGTH     00000118            

PCB$C_LENGTH     0000007C            PCB$W_MTXCNT     0000000E            PHD$L_BIOCNT     00000054            

PCB$K_LENGTH     0000007C            PCB$W_PPGCNT     0000003A            PHD$L_CPULIM     00000058            

PCB$L_ASTQBL     00000014            PCB$W_PRCCNT     0000006A            PHD$L_CPUTIM     0000003C            

PCB$L_ASTQFL     00000010            PCB$W_SIZE       00000008            PHD$L_DIOCNT     00000050            

PCB$L_EFC2P      00000058            PCB$W_STATE      00000030            PHD$L_ESP        0000007C            

PCB$L_EFC3P      0000005C            PCB$W_TMBU       00000036            PHD$L_FREP0VA    00000028            

PCB$L_EFCS       00000050            PCB$W_TQCNT      0000004A            PHD$L_FREP1VA    00000030            

PCB$L_EFCU       00000054            PFN$AB_STATE     ********   X   03   PHD$L_FREPTECNT  0000002C            

PCB$L_EFWM       0000004C            PFN$AL_BAK       ********   X   03   PHD$L_KSP        00000078            

PCB$L_OWNER      0000001C            PFN$AW_REFCNT    ********   X   03   PHD$L_P0BR       000000C8            

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page  14

SYMBOL TABLE                                                                                                                     (6)



PHD$L_P0LRASTL   000000CC            PHD$W_PTCNTMAX   00000072            PTE$C_EW       = 28000000            

PHD$L_P1BR       000000D0            PHD$W_PTCNTVAL   0000006E            PTE$C_KOWN     = 00000000            

PHD$L_P1LR       000000D4            PHD$W_QUANT      00000040            PTE$C_KR       = 18000000            

PHD$L_PAGEFLTS   0000004C            PHD$W_TQLM       00000062            PTE$C_KW       = 10000000            

PHD$L_PAGFIL     0000001C            PHD$W_WSAUTH     0000000A            PTE$C_NA       = 00000000            

PHD$L_PC         000000C0            PHD$W_WSDYN      0000000E            PTE$C_SOWN     = 01000000            

PHD$L_PCB        00000078            PHD$W_WSFLUID    00000074            PTE$C_SR       = 58000000            

PHD$L_PGFLCNT    00000034            PHD$W_WSLAST     00000012            PTE$C_SREW     = 48000000            

PHD$L_PGFLQUOTA  0000005C            PHD$W_WSLIST     00000008            PTE$C_SRKW     = 50000000            

PHD$L_PSL        000000C4            PHD$W_WSLOCK     0000000C            PTE$C_SW       = 40000000            

PHD$L_PSTBASOFF  00000020            PHD$W_WSLX       0000004A            PTE$C_UOWN     = 01800000            

PHD$L_PTWSLELCK  00000064            PHD$W_WSNEXT     00000010            PTE$C_UR       = 78000000            

PHD$L_PTWSLEVAL  00000068            PHD$W_WSQUOTA    00000018            PTE$C_UREW     = 68000000            

PHD$L_R0         00000088            PR$_ACCR       = 00000029            PTE$C_URKW     = 70000000            

PHD$L_R1         0000008C            PR$_ACCS       = 00000028            PTE$C_URSW     = 60000000            

PHD$L_R10        000000B0            PR$_ASTLVL     = 00000013            PTE$C_UW       = 20000000            

PHD$L_R11        000000B4            PR$_ESP        = 00000001            PTE$M_CRF      = 00010000            

PHD$L_R12        000000B8            PR$_ICCS       = 00000018            PTE$M_DZRO     = 00020000            

PHD$L_R13        000000BC            PR$_ICR        = 0000001A            PTE$M_GPTX     = 003FFFFF            

PHD$L_R2         00000090            PR$_IPL        = 00000012            PTE$M_MODIFY   = 04000000            

PHD$L_R3         00000094            PR$_ISP        = 00000004            PTE$M_OWN      = 01800000            

PHD$L_R4         00000098            PR$_KSP        = 00000000            PTE$M_PFN      = 001FFFFF            

PHD$L_R5         0000009C            PR$_MAPEN      = 00000038            PTE$M_PGFLVB   = 003FFFFF            

PHD$L_R6         000000A0            PR$_NICR       = 00000019            PTE$M_PROT     = 78000000            

PHD$L_R7         000000A4            PR$_P0BR       = 00000008            PTE$M_TYP0     = 00400000            

PHD$L_R8         000000A8            PR$_P0LR       = 00000009            PTE$M_TYP1     = 04000000            

PHD$L_R9         000000AC            PR$_P1BR       = 0000000A            PTE$M_VALID    = 80000000            

PHD$L_REFERFLT   00000014            PR$_P1LR       = 0000000B            PTE$M_WRT      = 00040000            

PHD$L_SSP        00000080            PR$_PCBB       = 00000010            PTE$S_GPTX     = 00000016            

PHD$L_USP        00000084            PR$_PME        = 0000003D            PTE$S_OWN      = 00000002            

PHD$L_WSL        00000118            PR$_RXCS       = 00000020            PTE$S_PFN      = 00000015            

PHD$M_DALCSTX  = 00000002            PR$_RXDB       = 00000021            PTE$S_PGFLVB   = 00000016            

PHD$M_PFMFLG   = 00000001            PR$_SBIER      = 00000034            PTE$S_PROT     = 00000004            

PHD$M_WSPEAKCHK= 00000004            PR$_SBIFS      = 00000030            PTE$S_STX      = 00000010            

PHD$Q_PRIVMSK    00000000            PR$_SBIMT      = 00000033            PTE$V_CRF      = 00000010            

PHD$S_ASTLVL   = 00000008            PR$_SBIQC      = 00000036            PTE$V_DZRO     = 00000011            

PHD$S_P0LR     = 00000018            PR$_SBIS       = 00000031            PTE$V_GPTX     = 00000000            

PHD$V_ASTLVL   = 00000018            PR$_SBISC      = 00000032            PTE$V_MODIFY   = 0000001A            

PHD$V_DALCSTX  = 00000001            PR$_SBITA      = 00000035            PTE$V_OWN      = 00000017            

PHD$V_P0LR     = 00000000            PR$_SBR        = 0000000C            PTE$V_PFN      = 00000000            

PHD$V_PFMFLG   = 00000000            PR$_SCBB       = 00000011            PTE$V_PGFLVB   = 00000000            

PHD$V_WSPEAKCHK= 00000002            PR$_SID        = 0000003E            PTE$V_PROT     = 0000001B            

PHD$W_ASTLM      00000044            PR$_SIRR       = 00000014            PTE$V_STX      = 00000000            

PHD$W_BAK        00000048            PR$_SISR       = 00000015            PTE$V_TYP0     = 00000016            

PHD$W_DFWSCNT    0000001A            PR$_SLR        = 0000000D            PTE$V_TYP1     = 0000001A            

PHD$W_EMPTPG     000000D8            PR$_SSP        = 00000002            PTE$V_VALID    = 0000001F            

PHD$W_EXTDYNWS   00000076            PR$_TBIA       = 00000039            PTE$V_WRT      = 00000012            

PHD$W_FILLM      00000060            PR$_TBIS       = 0000003A            RELEASEPEND      00000147 R     03   

PHD$W_FLAGS      0000003A            PR$_TODR       = 0000001B            SS$_ABORT      = 0000002C            

PHD$W_PHVINDEX   00000046            PR$_TXCS       = 00000022            SS$_ACCONFLICT = 00000800            

PHD$W_PRCLM      00000042            PR$_TXDB       = 00000023            SS$_ACCVIO     = 0000000C            

PHD$W_PST        00000020            PR$_USP        = 00000003            SS$_ACPVAFUL   = 000002FC            

PHD$W_PSTBASMAX  0000004A            PR$_WCSA       = 0000002C            SS$_ARTRES     = 00000474            

PHD$W_PSTFREE    00000026            PR$_WCSD       = 0000002D            SS$_ASTFLT     = 0000040C            

PHD$W_PSTLAST    00000024            PTE$C_EOWN     = 00800000            SS$_BADATTRIB  = 00000034            

PHD$W_PTCNTACT   00000070            PTE$C_ER       = 38000000            SS$_BADCHKSUM  = 00000808            

PHD$W_PTCNTLCK   0000006C            PTE$C_ERKW     = 30000000            SS$_BADESCAPE  = 0000003C            

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page  15

SYMBOL TABLE                                                                                                                     (6)



SS$_BADFILEHDR = 00000810            SS$_FILENUMCHK = 000008B0            SS$_NODATA     = 000001AC            

SS$_BADFILENAME= 00000818            SS$_FILESEQCHK = 000008B8            SS$_NOHANDLER  = 000008F8            

SS$_BADFILEVER = 00000820            SS$_FILESTRUCT = 000008C0            SS$_NOHOMEBLK  = 000008E0            

SS$_BADIMGHDR  = 00000044            SS$_FILNOTACC  = 000000AC            SS$_NOIOCHAN   = 000001B4            

SS$_BADIRECTORY= 00000828            SS$_FILNOTCNTG = 000002AC            SS$_NOLINKS    = 0000027C            

SS$_BADPARAM   = 00000014            SS$_FILNOTEXP  = 000000B4            SS$_NOLOGNAM   = 000001BC            

SS$_BADSTACK   = 000002B4            SS$_FLTDIV     = 00000494            SS$_NOMBX      = 00000274            

SS$_BEGOFFILE  = 00000938            SS$_FLTOVF     = 0000048C            SS$_NOMOREFILES= 00000930            

SS$_BLOCKCNTERR= 00000940            SS$_FLTUND     = 0000049C            SS$_NONEXDRV   = 000001C4            

SS$_BREAK      = 00000414            SS$_FORMAT     = 000000BC            SS$_NONEXPR    = 000008E8            

SS$_BUFBYTALI  = 0000030C            SS$_GPTFULL    = 000000C4            SS$_NONLOCAL   = 000008F0            

SS$_BUFFEROVF  = 00000601            SS$_GSDFULL    = 000000CC            SS$_NOPRIV     = 00000024            

SS$_BUGCHECK   = 000002A4            SS$_HANGUP     = 000002CC            SS$_NORMAL     = 00000001            

SS$_CANCEL     = 00000830            SS$_HEADERFULL = 000008C8            SS$_NOSIGNAL   = 00000900            

SS$_CHANINTLK  = 0000004C            SS$_IDXFILEFULL= 000008D0            SS$_NOSOLICIT  = 00000284            

SS$_CLIFRCEXT  = 00000980            SS$_ILLBLKNUM  = 000000DC            SS$_NOSUCHDEV  = 00000908            

SS$_CMODSUPR   = 0000041C            SS$_ILLCNTRFUNC= 000000E4            SS$_NOSUCHFILE = 00000910            

SS$_CMODUSER   = 00000424            SS$_ILLEFC     = 000000EC            SS$_NOSUCHNODE = 0000028C            

SS$_COMPAT     = 0000042C            SS$_ILLIOFUNC  = 000000F4            SS$_NOSUCHSEC  = 00000978            

SS$_CONTINUE   = 00000001            SS$_ILLLBLAST  = 00000968            SS$_NOTAPEOP   = 00000264            

SS$_CONTROLC   = 00000651            SS$_ILLPAGCNT  = 000000FC            SS$_NOTFILEDEV = 000001CC            

SS$_CONTROLO   = 00000609            SS$_ILLSEQOP   = 000002DC            SS$_NOTINTBLSZ = 000001D4            

SS$_CONTROLY   = 00000611            SS$_ILLSER     = 00000104            SS$_NOTLABELMT = 000001DC            

SS$_CREATED    = 00000619            SS$_ILLUSRLBLRD= 00000958            SS$_NOTMODIFIED= 00000659            

SS$_CTRLERR    = 00000054            SS$_ILLUSRLBLWT= 00000960            SS$_NOTNETDEV  = 000002EC            

SS$_DATACHECK  = 0000005C            SS$_INCVOLLABEL= 0000010C            SS$_NOTRAN     = 00000629            

SS$_DATAOVERUN = 00000838            SS$_INSFARG    = 00000114            SS$_NOTSQDEV   = 000001E4            

SS$_DEBUG      = 0000046C            SS$_INSFMEM    = 00000124            SS$_OPCCUS     = 00000434            

SS$_DECOVF     = 000004A4            SS$_INSFRAME   = 0000012C            SS$_OPCDEC     = 0000043C            

SS$_DEVACTIVE  = 000002C4            SS$_INSFWSL    = 0000011C            SS$_OPINCOMPL  = 000002D4            

SS$_DEVALLOC   = 00000840            SS$_INTDIV     = 00000484            SS$_PAGOWNVIO  = 000001EC            

SS$_DEVALRALLOC= 00000641            SS$_INTOVF     = 0000047C            SS$_PAGRDERR   = 00000444            

SS$_DEVASSIGN  = 00000848            SS$_IVADDR     = 00000134            SS$_PARITY     = 000001F4            

SS$_DEVFOREIGN = 00000064            SS$_IVCHAN     = 0000013C            SS$_PARTESCAPE = 000001FC            

SS$_DEVICEFULL = 00000850            SS$_IVCHNLSEC  = 0000026C            SS$_PFMBSY     = 00000204            

SS$_DEVMOUNT   = 0000006C            SS$_IVDEVNAM   = 00000144            SS$_PLHLDR     = 00000404            

SS$_DEVNOTALLOC= 00000858            SS$_IVGSDNAM   = 0000014C            SS$_PSTFULL    = 0000020C            

SS$_DEVNOTMBX  = 00000074            SS$_IVLOGNAM   = 00000154            SS$_RADRMOD    = 0000044C            

SS$_DEVNOTMOUNT= 0000007C            SS$_IVLOGTAB   = 0000015C            SS$_REJECT     = 00000294            

SS$_DEVOFFLINE = 00000084            SS$_IVPROTECT  = 000002F4            SS$_REMOTE     = 00000649            

SS$_DIRFULL    = 00000860            SS$_IVQUOTAL   = 00000164            SS$_RESIGNAL   = 00000918            

SS$_DRVERR     = 0000008C            SS$_IVSECFLG   = 0000016C            SS$_RESULTOVF  = 00000214            

SS$_DUPFILENAME= 00000868            SS$_IVSECIDCTL = 000002E4            SS$_ROPRAND    = 00000454            

SS$_DUPLNAM    = 00000094            SS$_IVSSRQ     = 00000174            SS$_SECTBLFUL  = 0000021C            

SS$_ENDOFFILE  = 00000870            SS$_IVSTSFLG   = 0000017C            SS$_SSFAIL     = 0000045C            

SS$_ENDOFTAPE  = 00000878            SS$_IVTIME     = 00000184            SS$_SUBRNG     = 000004AC            

SS$_ENDOFUSRLBL= 00000970            SS$_LCKPAGFUL  = 000000D4            SS$_SUPERSEDE  = 00000631            

SS$_EXQUOTA    = 0000001C            SS$_LENVIO     = 0000018C            SS$_TAPEPOSLOST= 00000224            

SS$_EXTIDXFILE = 00000880            SS$_LKWSETFUL  = 00000194            SS$_TBIT       = 00000464            

SS$_FCPREADERR = 00000888            SS$_MBFULL     = 000008D8            SS$_TIMEOUT    = 0000022C            

SS$_FCPREPSTN  = 00000988            SS$_MBTOOSML   = 0000019C            SS$_TOOMANYVER = 00000990            

SS$_FCPREWNDERR= 00000890            SS$_MCHECK     = 000002BC            SS$_TOOMUCHDATA= 0000029C            

SS$_FCPSPACERR = 00000898            SS$_MEDOFL     = 000001A4            SS$_UNASEFC    = 00000234            

SS$_FCPWRITERR = 000008A0            SS$_MSGNOTFND  = 00000621            SS$_UNSAFE     = 0000023C            

SS$_FILACCERR  = 0000009C            SS$_MTLBLLONG  = 00000304            SS$_UNWIND     = 00000920            

SS$_FILALRACC  = 000000A4            SS$_MUSTCLOSEFL= 00000948            SS$_UNWINDING  = 00000928            

SS$_FILELOCKED = 000008A8            SS$_NOAQB      = 00000314            SS$_VASFULL    = 00000244            

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page  16

SYMBOL TABLE                                                                                                                     (6)



SS$_VECINUSE   = 0000024C            

SS$_VOLINV     = 00000254            

SS$_WAITUSRLBL = 00000950            

SS$_WASCLR     = 00000001            

SS$_WASECC     = 00000639            

SS$_WASSET     = 00000009            

SS$_WRITLCK    = 0000025C            

SS$_WRONGACP   = 0000031C            

SWP$GL_BALBASE   ********   X   03   

TMP...         = 00000001            

TOOMANYPAGES     00000005 R     03   

VA$M_BYTE      = 000001FF            

VA$M_P1        = 40000000            

VA$M_SYSTEM    = 80000000            

VA$M_VPG       = FFFFFE00            

VA$M_VPN       = 3FFFFE00            

VA$S_BYTE      = 00000009            

VA$S_VPG       = 00000017            

VA$S_VPN       = 00000015            

VA$V_BYTE      = 00000000            

VA$V_P1        = 0000001E            

VA$V_SYSTEM    = 0000001F            

VA$V_VPG       = 00000009            

VA$V_VPN       = 00000009            

WRITEINPROG      00000147 R     03   

WSL$C_GBLWRT   = 00000006            

WSL$C_GLOBAL   = 00000004            

WSL$C_GPGTBL   = 0000000A            

WSL$C_LENGTH   = 00000004            

WSL$C_PPGTBL   = 00000008            

WSL$C_PROCESS  = 00000000            

WSL$C_SYSTEM   = 00000002            

WSL$M_GOODPAGE = 00000040            

WSL$M_MODIFY   = 00000100            

WSL$M_PAGTYP   = 0000000E            

WSL$M_PFNLOCK  = 00000010            

WSL$M_VALID    = 00000001            

WSL$M_WSLOCK   = 00000020            

WSL$S_PAGTYP   = 00000003            

WSL$V_GOODPAGE = 00000006            

WSL$V_MODIFY   = 00000008            

WSL$V_PAGTYP   = 00000001            

WSL$V_PFNLOCK  = 00000004            

WSL$V_VALID    = 00000000            

WSL$V_WSLOCK   = 00000005            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            0000011C      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

$MMGCOD          0000023A      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

10102. BYTES LEFT IN FREE MEMORY POOL.

IOLOCK          - LOCK AND UNLOCK PAGES FOR I/O                  21-AUG-1978 19:53:17   VAX-11 MACRO X0.3-11               Page  17

PROGRAM SECTION SYNOPSIS                                                                                                         (6)



2736. BYTES OF RECLAIMED MEMORY.

OBJ$:IOLOCK,LIS$:IOLOCK/-SP=EXECML$/ML,SRC$:IOLOCK

14 MLB DIR RDS - 905 GETS TO DEFINE 26 MACROS. 66 INTER. FILE WRITES. 

