SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)    3700  DECLARATIONS

   (1)    5700  EXE$WFLAND - WAIT FOR LOGICAL AND OF EVENT FLAG

   (1)    9500  EXE$WFLOR - WAIT FOR LOGICAL OR OF EVENTS

   (1)   13300  EXE$WAITFR - WAIT FOR SINGLE EVENT

   (1)   17600  EXE$WAIT - WAIT COMMON CODE

   (1)   23400  SCH$WAIT - PLACE PROCESS IN SELECTED WAIT QUEUE

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   1

01                                                                                                                               (1)



                                     0000   100 	.TITLE	SYSWAIT EVENT FLAG WAIT SERVICES

                                     0000   200 	.IDENT	/01/

                                     0000   300 ; COPYRIGHT (C) 1977

                                     0000   400 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

                                     0000   500 ;

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

                                     0000   700 ; SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

                                     0000   800 ; SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

                                     0000   900 ; OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

                                     0000  1000 ; AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

                                     0000  1100 ; AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

                                     0000  1200 ; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

                                     0000  1300 ;

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

                                     0000  1500 ; NOTICE AND SHOULD NOT BE CONSTRUED  AS  A COMMITMENT BY DIGITAL

                                     0000  1600 ; EQUIPMENT CORPORATION.

                                     0000  1700 ;

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

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

                                     0000  2000 ;++

                                     0000  2100 ; FACILITY: EXECUTIVE, EVENT FLAG SERVICES

                                     0000  2200 ;

                                     0000  2300 ; ABSTRACT: WAIT CONTAINS THE THREE FORMS OF EVENT FLAG WAIT

                                     0000  2400 ;	    SYSTEM SERVICES WHICH PROVIDE FOR SINGLE EVENT WAIT AS

                                     0000  2500 ;	    WELL AS COMBINATIONS OF MULTIPLE EVENTS.

                                     0000  2600 ;

                                     0000  2700 ;--

                                     0000  2800 ;

                                     0000  2900 ; AUTHOR:

                                     0000  3000 ;	R.HUSTVEDT : VERSION

                                     0000  3100 ;

                                     0000  3200 ; MODIFIED BY:

                                     0000  3300 ;	, : VERSION

                                     0000  3400 ; 01	-

                                     0000  3500 

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   2

01              DECLARATIONS                                                                                                     (1)



                                     0000  3700 	.SBTTL	DECLARATIONS

                                     0000  3800 

                                     0000  3900 ;

                                     0000  4000 ; INCLUDE FILES:

                                     0000  4100 ;

                                     0000  4200 

                                     0000  4300 	$CEBDEF					;COMMON EVENT BLOCK DEFS

                                     0000  4400 	$IPLDEF					;IPL DEFINITIONS

                                     0000  4500 	$PCBDEF					;PCB DEFINITIONS

                                     0000  4600 	$PRDEF					;PROCESSOR REGISTER DEFS

                                     0000  4700 	$SSDEF					;STATUS CODE DEFINITIONS

                                     0000  4800 	$STATEDEF				;STATE DEFINITIONS

                                     0000  4900 	$WQHDEF					;WAIT QUEUE HEADER DEFS

                                     0000  5000 ;

                                     0000  5100 ; EQUATES:

                                     0000  5200 ;

                           00000004  0000  5300 EFN=4						;EVENT FLAG NUMBER

                           00000008  0000  5400 MASK=8						;WAIT MASK

                                 00000000  5500 	.PSECT	AEXENONPAGED			;NON-PAGED

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   3

01              EXE$WFLAND - WAIT FOR LOGICAL AND OF EVENT FLAG                                                                  (1)



                                     0000  5700 	.SBTTL	EXE$WFLAND - WAIT FOR LOGICAL AND OF EVENT FLAGS

                                     0000  5800 ;++

                                     0000  5900 ;

                                     0000  6000 ;	EXE$WFLAND - WAIT FOR LOGICAL AND OF EVENT FLAGS

                                     0000  6100 ;

                                     0000  6200 ; FUNCTIONAL DESCRIPTION:

                                     0000  6300 ;	EXE$WFLAND RETURNS TO THE CALLER WHEN THE SET OF EVENT

                                     0000  6400 ;	FLAGS SELECTED BY THE MASK ARE ALL SET AND RETURNS THE

                                     0000  6500 ;	STATE OF ALL EVENT FLAGS IN THE SPECIFIED CLUSTER.

                                     0000  6600 ;

                                     0000  6700 ; CALLING SEQUENCE:

                                     0000  6800 ;	CALLG	ARGLIST,EXE$WFLAND

                                     0000  6900 ;

                                     0000  7000 ; INPUT PARAMETERS:

                                     0000  7100 ;	04(AP) - EVENT FLAG NUMBER SELECTING CLUSTER

                                     0000  7200 ;	08(AP) - MASK SELECTING COMBINATION OF EVENTS

                                     0000  7205 ;	R4 - PCB ADDRESS OF CURRENT PROCESS

                                     0000  7300 ;

                                     0000  7400 ; OUTPUT PARAMETERS:

                                     0000  7500 ;	R0 - COMPLETION STATUS CODE

                                     0000  7600 ;	     CONDITION IS SATISFIED.

                                     0000  7700 ;

                                     0000  7800 ; SIDE EFFECTS: 

                                     0000  7900 ;	IF THE SET OF EVENT FLAGS SELECTED BY THE MASK ARE NOT

                                     0000  8000 ;	ALL SET, THEN THE PROCESS ISSUING THE WAIT SERVICE CALL WILL

                                     0000  8100 ;	BE PLACED IN A WAIT STATE.

                                     0000  8200 ;

                                     0000  8300 ; COMPLETION CODES:

                                     0000  8400 ;	SS$_NORMAL - NORMAL SUCCESSFUL COMPLETION

                                     0000  8500 ;	SS$_ILLEFC - ILLEGAL EVENT FLAG CLUSTER NUMBER.  EVENT NUMBER

                                     0000  8600 ;		     NOT IN THE RANGE 0-127.

                                     0000  8700 ;	SS$_UNASEFC - UNASSIGNED EVENT FLAG CLUSTER.

                                     0000  8800 ;

                                     0000  8900 ;--

                                     0000  9000 EXE$WFLAND::				;WAIT FOR LOGICAL AND

                               003C  0000  9100 	.WORD	^M<R2,R3,R4,R5>		;REGISTER SAVE MASK FOR R2-R5

            51            01     D0  0002  9200 	MOVL	#1,R1			;SET MODE TO WAITALL

                          04     11  0005  9300 	BRB	WFRL			;AND MERGE WITH COMMON CODE

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   4

01              EXE$WFLOR - WAIT FOR LOGICAL OR OF EVENTS                                                                        (1)



                                     0007  9500 	.SBTTL	EXE$WFLOR - WAIT FOR LOGICAL OR OF EVENTS

                                     0007  9600 ;++

                                     0007  9700 ;	EXE$WFLOR - WAIT FOR LOGICAL OR OF EVENTS

                                     0007  9800 ;

                                     0007  9900 ; FUNCTIONAL DESCRIPTION:

                                     0007 10000 ;	EXE$WFLOR RETURNS TO THE CALLER WHEN ANY OF THE

                                     0007 10100 ;	EVENTS SELECTED BY THE MASK WITHIN THE SPECIFIED CLUSTER

                                     0007 10200 ;	ARE SET AND RETURNS THE STATE OF ALL 32 EVENT FLAGS IN THE

                                     0007 10300 ;	CLUSTER.

                                     0007 10400 ;

                                     0007 10500 ; CALLING SEQUENCE:

                                     0007 10600 ;	CALLG	ARGLIST,EXE$WFLOR

                                     0007 10700 ;

                                     0007 10800 ; INPUT PARAMETERS:

                                     0007 10900 ;	04(AP) - EVENT FLAG NUMBER TO SELECT CLUSTER

                                     0007 11000 ;	08(AP) - MASK SELECTING DESIRED COMBINATION OF EVENTS

                                     0007 11005 ;	R4 - PCB ADDRESS OF CURRENT PROCESS

                                     0007 11100 ;

                                     0007 11200 ; OUTPUT PARAMETERS:

                                     0007 11300 ;	R0 - COMPLETION STATUS CODE

                                     0007 11400 ;	     IS SATISFIED.

                                     0007 11500 ;

                                     0007 11600 ;

                                     0007 11700 ; COMPLETION CODES:

                                     0007 11800 ;	SS$_NORMAL - NORMAL SUCCESSFUL COMPLETION

                                     0007 11900 ;	SS$_ILLEFC - ILLEGAL EVENT FLAG NUMBER NOT IN THE RANGE 0-127.

                                     0007 12000 ;	SS$_UNASEFC - UNASSIGNED EVENT FLAG CLUSTER.

                                     0007 12100 ;

                                     0007 12200 ; SIDE EFFECTS:

                                     0007 12300 ;	THE PROCESS ISSUING THE SERVICE CALL IS BE PLACED IN A

                                     0007 12400 ;	WAIT STATE IF NONE OF THE SPECIFIED EVENTS ARE SET.

                                     0007 12500 ;

                                     0007 12600 ;--

                                     0007 12700 EXE$WFLOR::				;WAIT FOR LOGICAL OR

                               003C  0007 12800 	.WORD	^M<R2,R3,R4,R5>		;REGISTER SAVE MASK FOR R2-R5

                          51     D4  0009 12900 	CLRL	R1			;SET MODE TO WAIT ANY

            50         08 AC     D0  000B 13000 WFRL:	MOVL	MASK(AP),R0		;GET WAIT MASK

                          09     11  000F 13100 	BRB	EXE$WAIT		;MERGE WITH COMMON CODE

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   5

01              EXE$WAITFR - WAIT FOR SINGLE EVENT                                                                               (1)



                                     0011 13300 	.SBTTL	EXE$WAITFR - WAIT FOR SINGLE EVENT

                                     0011 13400 ;++

                                     0011 13500 ;	EXE$WAITFR - WAIT FOR SINGLE EVENT

                                     0011 13600 ;

                                     0011 13700 ;

                                     0011 13800 ; FUNCTIONAL DESCRIPTION:

                                     0011 13900 ;	EXE$WAITFR RETURNS TO THE CALLER WHEN THE SPECIFIED SINGLE

                                     0011 14000 ;	EVENT FLAG IS SET.  UPON RETURN THE STATE OF ALL 32 EVENT FLAGS

                                     0011 14100 ;	WITHIN THE CLUSTER CONTAINING THE SPECIFIED EVENT ARE RETURN.

                                     0011 14200 ;

                                     0011 14300 ; CALLING SEQUENCE:

                                     0011 14400 ;	CALLG	ARGLIST,EXE$WAITFR

                                     0011 14500 ;

                                     0011 14600 ; INPUT PARAMETERS:

                                     0011 14700 ;	04(AP)=EVENT FLAG NUMBER

                                     0011 14705 ;	R4 - PCB ADDRESS OF CURRENT PROCESS 

                                     0011 14800 ;

                                     0011 14900 ; OUTPUT PARAMETERS:

                                     0011 15000 ;	R0 - COMPLETION STATUS CODE

                                     0011 15100 ;	     SATISIFIED.

                                     0011 15200 ;

                                     0011 15300 ; SIDE EFFECTS:

                                     0011 15400 ;	IF THE SPECIFIED EVENT FLAG IS NOT SET, THE PROCESS ISSUING THE

                                     0011 15500 ;	WAIT SYSTEM SERVICE WILL BE PLACED IN THE APPROPRIATE WAIT

                                     0011 15600 ;	STATE.

                                     0011 15700 ;

                                     0011 15800 ; COMPLETION CODES:

                                     0011 15900 ;	SS$_NORMAL - NORMAL SUCCESSFUL COMPLETION

                                     0011 16000 ;	SS$_ILLEFC - ILLEGAL EVENT FLAG NUMBER NOT IN THE RANGE 0-127.

                                     0011 16100 ;	SS$_UNASEFC - UNASSIGNED EVENT FLAG CLUSTER.

                                     0011 16200 ;

                                     0011 16300 ; ENVIRONMENT:

                                     0011 16400 ;	MODE=KERNEL

                                     0011 16500 ;--

                                     0011 16600 EXE$WAITFR::				;WAIT FOR SINGLE EVENT

                               003C  0011 16700 	.WORD	^M<R2,R3,R4,R5>		;SAVE REGISTERS R2,R3,R4,R5

                          51     D4  0013 16800 	CLRL	R1			;SET MODE 

            01         04 AC     9C  0015 16900 	ROTL	EFN(AP),#1,R0		;INIT MASK

                          50         0019       

                                     001A 17400 ;	BRB	EXE$WAIT		;AND MERGE WITH COMMON CODE

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   6

01              EXE$WAIT - WAIT COMMON CODE                                                                                      (1)



                                     001A 17600 	.SBTTL	EXE$WAIT - WAIT COMMON CODE

                                     001A 17700 ;++

                                     001A 17800 ;	EXE$WAIT - WAIT COMMON CODE

                                     001A 17900 ;

                                     001A 18000 ; INPUT:

                                     001A 18100 ;	04(AP) = EVENT FLAG NUMBER

                                     001A 18200 ;	R0 = MASK SELECTING EVENTS OF INTEREST

                                     001A 18300 ;	R1 = ANY/ALL MODE SELECTOR

                                     001A 18400 ;		0 => ANY

                                     001A 18500 ;		1 => ALL

                                     001A 18505 ;	R4 = PCB ADDRESS OF CURRENT PROCESS

                                     001A 18600 ;

                                     001A 18700 ; IMPLICIT INPUTS:

                                     001A 18900 ;	CEB IF NON-LOCAL CLUSTER.

                                     001A 19000 ;

                                     001A 19100 ; OUTPUT:

                                     001A 19200 ;	R0 - COMPLETION STATUS CODE

                                     001A 19300 ;	     SATISIFIED.

                                     001A 19400 ;--

                                     001A 19500 EXE$WAIT:				;WAIT COMMON CODE

            52         04 AC     98  001A 19600 	CVTBL	EFN(AP),R2		;GET CLUSTER NUMBER

                          18     19  001E 19700 	BLSS	10$			;ILLEGAL IF NOT (0,1,2,3)

            52         FB 8F     78  0020 19750 	ASHL	#-5,R2,R2		;RIGHT ALIGN CLUSTER NUMBER

                          52         0024       

            53         50 A442   DE  0025 19900 	MOVAL	PCB$L_EFCS(R4)[R2],R3	;POINTER TO PCB EVENT CLUSTER

         32 A4            52     90  002A 20000 	MOVB	R2,PCB$B_WEFC(R4)	;SAVE WAIT CLUSTER NUMBER

            13            52     F5  002E 20100 	SOBGTR	R2,30$			;BR IF COMMON CLUSTER R2 = (2,3)

            52       0000'CF     7E  0031 20200 	MOVAQ	W^SCH$GQ_LEFWQ,R2	;SET WAIT QUEUE POINTER

                          15     11  0036 20300 	BRB	WAITCK			;

            50       00EC 8F     3C  0038 20400 10$:	MOVZWL	#SS$_ILLEFC,R0		;SET ERROR CODE FOR ILLEGAL CLUSTER

                                 04  003D 20500 	RET				;AND EXIT

            50       0234 8F     3C  003E 20600 20$:	MOVZWL	#SS$_UNASEFC,R0		;SET ERROR CODE FOR UNASSIGNED

                                 04  0043 20700 	RET				;AND EXIT

            63            10     C1  0044 20800 30$:	ADDL3	#CEB$L_EFC,(R3),R2	;GET CEB ADDRESS FOR EVENT FLAGS

                          52         0047       

                          F4     18  0048 20900 	BGEQ	20$			;CEB ASSIGNED (SYSTEM SPACE ADDRESS)

                                     004A 21000 	ASSUME	<CEB$L_EFC+4> EQ CEB$L_WQFL

            53            82     DE  004A 21100 	MOVAL	(R2)+,R3		;GET EVENT POINTER AND WAIT QUEUE ADDR

                                     004D 21200 					; R3=CEB$L_EFC, R2=CEB$L_WQFL

                                     004D 21300 ;

                                     004D 21400 ;	R0 - MASK SELECTING EVENTS OF INTEREST

                                     004D 21500 ;	R1 - ANY/ALL MODE SELECTOR

                                     004D 21600 ;	R2 - ADDRESS OF WAIT QUEUE HEADER

                                     004D 21700 ;	R3 - ADDRESS OF EVENT FLAG VECTOR

                                     004D 21800 ;	R4 - PCB ADDRESS

                                     004D 21900 ;

                                     004D 22000 WAITCK:					;CHECK FOR WAIT SATISFIED

                                     004D 22002 	SETIPL	#IPL$_SYNCH		;BLOCK SCHEDULING ACTIVITY

            50            63     D3  0050 22005 	BITL	(R3),R0			;WAIT FOR LOGICAL OR MAY BE SATISFIED

                          1D     13  0053 22010 	BEQL	WAIT			;NO, MUST WAIT

            0B            51     E8  0055 22500 	BLBS	R1,WAITALL		; 1 => WAIT FOR ALL IN MASK

                                     0058 22600 NOWAIT:					;

            50            01     D0  0058 22700 	MOVL	#SS$_NORMAL,R0		;RETURN SUCCESS CODE

            5D         0C AD     D0  005B 22800 	MOVL	12(FP),FP		;GET SAVED FRAME POINTER

            5E            00'    C0  005F 22850 	ADDL	S^#EXE$C_CMSTKSZ,SP	;CLEAN STACK TO PC,PSL

                                 02  0062 22875 	REI				;RETURN TO CALLER

                                     0063 22887 

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   7

01              EXE$WAIT - WAIT COMMON CODE                                                                                      (1)



                                     0063 22900 WAITALL:				; WAIT FOR ALL SELECTED EVENTS

            50            50     D2  0063 22905 	MCOML	R0,R0			;INVERT MASK FOR BIT CLEAR

            63            50     CB  0066 22910 	BICL3	R0,(R3),R5		;EXTRACT EVENTS OF INTEREST

                          55         0069       

            50            50     D2  006A 22915 	MCOML	R0,R0			;AND NORMALIZE MASK

            50            55     CC  006D 23000 	XORL2	R5,R0			;CHECK FOR ALL SET

                          E6     13  0070 23100 	BEQL	NOWAIT			;YES, DONT WAIT

            0D            51     F0  0072 23200 WAIT:	INSV	R1,#PCB$V_WALL,#1,PCB$L_STS(R4)	;SET WAIT ALL FLAG

         28 A4            01         0075       

         4C A4            50     D2  0078 23205 	MCOML	R0,PCB$L_EFWM(R4)	;SAVE INVERTED WAIT MASK

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   8

01              SCH$WAIT - PLACE PROCESS IN SELECTED WAIT QUEUE                                                                  (1)



                                     007C 23400 	.SBTTL	SCH$WAIT - PLACE PROCESS IN SELECTED WAIT QUEUE

                                     007C 23500 ;++

                                     007C 23600 ;	SCH$WAIT - PLACE PROCESS IN SELECTED WAIT QUEUE

                                     007C 23700 ;

                                     007C 23800 ; FUNCTIONAL DESCRIPTION:

                                     007C 23900 ;	SCH$WAIT PLACES THE CURRENT PROCESS IN A WAIT QUEUE

                                     007C 24000 ;	SELECTED BY A WAIT QUEUE HEADER ADDRESS SUPPLIED IN A REGISTER

                                     007C 24100 ;	A NEW PROCESS IS THEN SELECTED FOR EXECUTION.

                                     007C 24200 ;

                                     007C 24300 ; CALLING SEQUENCE:

                                     007C 24400 ;	JMP/BR	SCH$WAIT

                                     007C 24500 ;

                                     007C 24600 ; INPUT PARAMETERS:

                                     007C 24700 ;	R2 - WAIT QUEUE HEADER ADDRESS

                                     007C 24800 ;	R4 - PCB ADDRESS

                                     007C 24900 ;	00(SP) - PC AT WHICH TO RESTART PROCESS

                                     007C 25000 ;	04(SP) - PSL WITH WHICH TO RESTART PROCESS

                                     007C 25100 ;

                                     007C 25200 ; IMPLICIT INPUTS:

                                     007C 25300 ;	NONE

                                     007C 25400 ;

                                     007C 25500 ; SIDE EFFECTS:

                                     007C 25600 ;	THE PROCESS SPECIFIED BY THE PCB ADDRESS IN R4 IS PLACED 

                                     007C 25700 ;	IN THE WAIT QUEUE LOCATED BY R2, ITS CONTEXT SAVED,

                                     007C 25800 ;	AND A NEW PROCESS SCHEDULED.

                                     007C 25900 ;

                                     007C 26000 ;

                                     007C 26100 ;--

                                     007C 26200 

                                     007C 26300 SCH$WAIT::				;PLACE PROCESS IN WAIT STATE

         46 A4         44 A4     B1  007C 26305 	CMPW	PCB$W_DIOCNT(R4),PCB$W_DIOLM(R4) ; CHECK FOR DIRECT I/O

                          0A     12  0081 26310 	BNEQ	10$			;YES, DONT TRIGGER SWAPPER

         40 A4         3E A4     B1  0083 26315 	CMPW	PCB$W_BIOCNT(R4),PCB$W_BIOLM(R4) ;CHECK FOR BUFFERED I/O

                          03     13  0088 26320 	BEQL	10$			;NO, NOT A LONG WAIT

                          FF73'  30  008A 26325 	BSBW	SCH$SWPWAKE		;WAKE SWAPPER

                                     008D 26330 10$:					;

            5D         0C AE     D0  008D 26400 	MOVL	12(SP),FP		;RESTORE FP

            5E            00'    C0  0091 26500 	ADDL2	S^#EXE$C_CMSTKSZ,SP	;CLEAN UP KERNEL STACK

            6E            04     C2  0094 26600 	SUBL2	#4,(SP)			;BACK UP SAVED PC

                                     0097 26700 SCH$WAITK::				;WAIT WITH STACK ALREADY CLEAN

                       08 A2     B6  0097 26800 	INCW	WQH$W_WQCNT(R2)		;INCREMENT COUNT FOR QUEUE

            62            64     0E  009A 26900 	INSQUE	(R4),WQH$L_WQFL(R2)	;INSERT IN QUEUE

         30 A4         0A A2     B0  009D 27000 	MOVW	WQH$W_WQSTATE(R2),PCB$W_STATE(R4) ;SET STATE FOR PROCESS

                                     00A2 27100 ;

                                     00A2 27200 ;					THE STATE NUMBER IS CONTAINED

                                     00A2 27300 ;					IN THE QUEUE HEADER

                                     00A2 27400 ;

                                     00A2 27500 SCH$WAITL::				; WAIT WITH STATE SET, STACK CLEANED

                                 07  00A2 27550 	SVPCTX				;SAVE PROCESS CONTEXT

         2C A4       0002'CF     D0  00A3 27600 	MOVL	W^EXE$GQ_SYSTIME+2,PCB$L_WTIME(R4) ;SAVE TIME AT WAIT START

         28 A4            11     E5  00A9 27700 	BBCC	#PCB$V_ASTPEN,PCB$L_STS(R4),10$	;BR IF NO PENDING AST

                          06         00AD       

                                     00AE 28100 

                          52     D4  00AE 28200 	CLRL	R2			;SET NULL PRIORITY INCREMENT

                                     00B0 28300 	RPTEVT	AST			;REPORT AST EVENT

                          FF49'  31  00B4 28400 10$:	BRW	W^SCH$SCHED		;GO SCHEDULE NEXT PROCESS

                                     00B7 28450 

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page   9

01              SCH$WAIT - PLACE PROCESS IN SELECTED WAIT QUEUE                                                                  (1)



                                     00B7 28500 	.END

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page  10

SYMBOL TABLE                                                                                                                     (1)



BIT...         = 0000000F            PCB$L_PID        00000060            PR$_ICR        = 0000001A            

CEB$B_STS        0000000B            PCB$L_PQB        0000004C            PR$_IPL        = 00000012            

CEB$B_TYPE       0000000A            PCB$L_SQBL       00000004            PR$_ISP        = 00000004            

CEB$L_CEBBL      00000004            PCB$L_SQFL       00000000            PR$_KSP        = 00000000            

CEB$L_CEBFL      00000000            PCB$L_STS        00000028            PR$_MAPEN      = 00000038            

CEB$L_EFC        00000010            PCB$L_UIC        00000020            PR$_NICR       = 00000019            

CEB$L_PID        0000000C            PCB$L_WSSWP      00000024            PR$_P0BR       = 00000008            

CEB$L_UIC        00000020            PCB$L_WTIME      0000002C            PR$_P0LR       = 00000009            

CEB$L_WQBL       00000018            PCB$T_LNAME      0000006C            PR$_P1BR       = 0000000A            

CEB$L_WQFL       00000014            PCB$V_ASTPEN   = 00000011            PR$_P1LR       = 0000000B            

CEB$T_EFCNAM     00000028            PCB$V_BATCH    = 0000000E            PR$_PCBB       = 00000010            

CEB$V_NOQUOTA  = 00000000            PCB$V_DELPEN   = 00000001            PR$_PME        = 0000003D            

CEB$V_PERM     = 00000001            PCB$V_FORCPEN  = 00000002            PR$_RXCS       = 00000020            

CEB$W_GRP        00000022            PCB$V_HIBER    = 00000013            PR$_RXDB       = 00000021            

CEB$W_PROT       00000024            PCB$V_INQUAN   = 00000003            PR$_SBIER      = 00000034            

CEB$W_REFC       00000026            PCB$V_LOGIN    = 00000014            PR$_SBIFS      = 00000030            

CEB$W_SIZE       00000008            PCB$V_NETWRK   = 00000015            PR$_SBIMT      = 00000033            

CEB$W_STATE      0000001E            PCB$V_NOACNT   = 0000000F            PR$_SBIQC      = 00000036            

CEB$W_WQCNT      0000001C            PCB$V_NODELET  = 00000017            PR$_SBIS       = 00000031            

EFN            = 00000004            PCB$V_PHDRES   = 00000012            PR$_SBISC      = 00000032            

EVT$_AST         ********   X   03   PCB$V_PSWAPM   = 00000004            PR$_SBITA      = 00000035            

EXE$C_CMSTKSZ    ********   X   03   PCB$V_PWRAST   = 00000016            PR$_SBR        = 0000000C            

EXE$GQ_SYSTIME   ********   X   03   PCB$V_RES      = 00000000            PR$_SCBB       = 00000011            

EXE$WAIT         0000001A R     03   PCB$V_RESPEN   = 00000005            PR$_SID        = 0000003E            

EXE$WAITFR       00000011 RG    03   PCB$V_SSFEXC   = 00000006            PR$_SIRR       = 00000014            

EXE$WFLAND       00000000 RG    03   PCB$V_SSFEXCE  = 00000007            PR$_SISR       = 00000015            

EXE$WFLOR        00000007 RG    03   PCB$V_SSFEXCS  = 00000008            PR$_SLR        = 0000000D            

GBL...         = 00000000            PCB$V_SSFEXCU  = 00000009            PR$_SSP        = 00000002            

IPL$_ASTDEL    = 00000002            PCB$V_SSRWAIT  = 0000000A            PR$_TBIA       = 00000039            

IPL$_HWCLK     = 00000018            PCB$V_SUSPEN   = 0000000B            PR$_TBIS       = 0000003A            

IPL$_IOPOST    = 00000004            PCB$V_SWPVBN   = 00000010            PR$_TODR       = 0000001B            

IPL$_MAILBOX   = 0000000B            PCB$V_WAKEPEN  = 0000000C            PR$_TXCS       = 00000022            

IPL$_POWER     = 0000001F            PCB$V_WALL     = 0000000D            PR$_TXDB       = 00000023            

IPL$_QUEUEAST  = 00000006            PCB$W_APTCNT     00000034            PR$_USP        = 00000003            

IPL$_SCHED     = 00000003            PCB$W_ASTCNT     0000003C            PR$_WCSA       = 0000002C            

IPL$_SYNCH     = 00000007            PCB$W_BIOCNT     0000003E            PR$_WCSD       = 0000002D            

IPL$_TIMER     = 00000007            PCB$W_BIOLM      00000040            SCH$C_CEF      = 00000003            

MASK           = 00000008            PCB$W_BYTCNT     00000042            SCH$C_COLPG    = 00000001            

NOWAIT           00000058 R     03   PCB$W_BYTLM      00000068            SCH$C_COM      = 0000000C            

PCB$B_ASTACT     0000000C            PCB$W_DIOCNT     00000044            SCH$C_COMO     = 0000000D            

PCB$B_ASTEN      0000000D            PCB$W_DIOLM      00000046            SCH$C_CUR      = 0000000E            

PCB$B_PRI        0000000B            PCB$W_FILCNT     00000048            SCH$C_FPG      = 0000000B            

PCB$B_PRIB       00000033            PCB$W_GPGCNT     00000038            SCH$C_HIB      = 00000007            

PCB$B_TYPE       0000000A            PCB$W_GRP        00000022            SCH$C_HIBO     = 00000008            

PCB$B_WEFC       00000032            PCB$W_MEM        00000020            SCH$C_LEF      = 00000005            

PCB$C_LENGTH     0000007C            PCB$W_MTXCNT     0000000E            SCH$C_LEFO     = 00000006            

PCB$K_LENGTH     0000007C            PCB$W_PPGCNT     0000003A            SCH$C_MWAIT    = 00000002            

PCB$L_ASTQBL     00000014            PCB$W_PRCCNT     0000006A            SCH$C_PFW      = 00000004            

PCB$L_ASTQFL     00000010            PCB$W_SIZE       00000008            SCH$C_SUSP     = 00000009            

PCB$L_EFC2P      00000058            PCB$W_STATE      00000030            SCH$C_SUSPO    = 0000000A            

PCB$L_EFC3P      0000005C            PCB$W_TMBU       00000036            SCH$GQ_LEFWQ     ********   X   03   

PCB$L_EFCS       00000050            PCB$W_TQCNT      0000004A            SCH$RSE          ********   X   03   

PCB$L_EFCU       00000054            PR$_ACCR       = 00000029            SCH$SCHED        ********   X   03   

PCB$L_EFWM       0000004C            PR$_ACCS       = 00000028            SCH$SWPWAKE      ********   X   03   

PCB$L_OWNER      0000001C            PR$_ASTLVL     = 00000013            SCH$WAIT         0000007C RG    03   

PCB$L_PHD        00000064            PR$_ESP        = 00000001            SCH$WAITK        00000097 RG    03   

PCB$L_PHYPCB     00000018            PR$_ICCS       = 00000018            SCH$WAITL        000000A2 RG    03   

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page  11

SYMBOL TABLE                                                                                                                     (1)



SS$_ABORT      = 0000002C            SS$_EXTIDXFILE = 00000880            SS$_LKWSETFUL  = 00000194            

SS$_ACCONFLICT = 00000800            SS$_FCPREADERR = 00000888            SS$_MBFULL     = 000008D8            

SS$_ACCVIO     = 0000000C            SS$_FCPREPSTN  = 00000988            SS$_MBTOOSML   = 0000019C            

SS$_ACPVAFUL   = 000002FC            SS$_FCPREWNDERR= 00000890            SS$_MCHECK     = 000002BC            

SS$_ARTRES     = 00000474            SS$_FCPSPACERR = 00000898            SS$_MEDOFL     = 000001A4            

SS$_ASTFLT     = 0000040C            SS$_FCPWRITERR = 000008A0            SS$_MSGNOTFND  = 00000621            

SS$_BADATTRIB  = 00000034            SS$_FILACCERR  = 0000009C            SS$_MTLBLLONG  = 00000304            

SS$_BADCHKSUM  = 00000808            SS$_FILALRACC  = 000000A4            SS$_MUSTCLOSEFL= 00000948            

SS$_BADESCAPE  = 0000003C            SS$_FILELOCKED = 000008A8            SS$_NOAQB      = 00000314            

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            

SYSWAIT         EVENT FLAG WAIT SERVICES                         21-AUG-1978 20:47:07   VAX-11 MACRO X0.3-11               Page  12

SYMBOL TABLE                                                                                                                     (1)



SS$_TBIT       = 00000464            

SS$_TIMEOUT    = 0000022C            

SS$_TOOMANYVER = 00000990            

SS$_TOOMUCHDATA= 0000029C            

SS$_UNASEFC    = 00000234            

SS$_UNSAFE     = 0000023C            

SS$_UNWIND     = 00000920            

SS$_UNWINDING  = 00000928            

SS$_VASFULL    = 00000244            

SS$_VECINUSE   = 0000024C            

SS$_VOLINV     = 00000254            

SS$_WAITUSRLBL = 00000950            

SS$_WASCLR     = 00000001            

SS$_WASECC     = 00000639            

SS$_WASSET     = 00000009            

SS$_WRITLCK    = 0000025C            

SS$_WRONGACP   = 0000031C            

WAIT             00000072 R     03   

WAITALL          00000063 R     03   

WAITCK           0000004D R     03   

WFRL             0000000B R     03   

WQH$C_LENGTH     0000000C            

WQH$K_LENGTH     0000000C            

WQH$L_WQBL       00000004            

WQH$L_WQFL       00000000            

WQH$W_WQCNT      00000008            

WQH$W_WQSTATE    0000000A            





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$            0000007C      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

AEXENONPAGED     000000B7      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

14764. BYTES LEFT IN FREE MEMORY POOL.

3578. BYTES OF RECLAIMED MEMORY.

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

8 MLB DIR RDS - 613 GETS TO DEFINE 19 MACROS. 42 INTER. FILE WRITES. 

