Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/cex/cexsch.lst
There are no other files named cexsch.lst in the archive.
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22
CEXSCH.M11    30-DEC-82 00:24		TABLE OF CONTENTS

  2652		DECLARATIONS
  2714		$CCBCK - Verify CCB address
  2767		$CCBQH - Queue CCB to Higher Level
  2806		$CCBQL - Queue CCB to Lower Level
  2855		$CEXSV	- Exit from Comm/Exec and Reschedule if Necessary
  2896		$CEXXT	- Exit from Comm/Exec and Reschedule if Necessary
  2948		$CRSH	- Set up Comm/Exec crash
  2989		$DSPCR - Undefined CCB Dispatch Crash
  3029		$ILVCK - Verify processing at interrupt level
  3074		$PAUSE - Pause in execution of process.
  3134		$PLVCK - Verify processing at process level
  3181		$PRCDS - Dispatch to a Process
  3238		$RLVCK - Verify processing at RSX level
  3285		$SCHED - Queue CCB to destination process
  3361		$SYNDS - SYNCH to a Process
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 1
CEXSCH.M11    30-DEC-82 00:24

     1						.TITLE	CEXSCH - COMM/EXEC SCHEDULER
     2						.IDENT	/003170/
     3						.ENABL	LC
     4
     5					;
     6					;                    COPYRIGHT (c) 1980, 1981, 1982
     7					;                    DIGITAL EQUIPMENT CORPORATION
     8					;                        Maynard, Massachusetts
     9					;
    10					;     This software is furnished under a license and may  be  used
    11					;     and copied only in accordance with the terms of such license
    12					;     and with the inclusion of the above copyright notice.   This
    13					;     software  or any other copies thereof may not be provided or
    14					;     otherwise made available to any other person.  No  title  to
    15					;     and ownership of the software is hereby transferred.
    16					;
    17					;     The information  in  this  software  is  subject  to  change
    18					;     without  notice  and should not be construed as a commitment
    19					;     by DIGITAL EQUIPMENT CORPORATION.
    20					;
    21					;     DIGITAL assumes no responsibility for the use or reliability
    22					;     of  its  software  on  equipment  which  is  not supplied by
    23					;     DIGITAL.
    24					;
    25
    26					;++
    27					; FACILITY: MCB Communications Executive
    28					;
    29					; FUNCTIONAL ABSTRACT:
    30					;
    31					;	This module contains the routines to handle scheduling
    32					;	of processes and interrupt synchronization.
    33					;
    34					; ENVIRONMENT: RSX kernel mode with EIS
    35					;
    36					; AUTHOR: Alan D. Peckham, CREATION DATE: 21-MAR-80
    37					;
    38					; MODIFIED BY:
    39					;
    40					;	Alan D. Peckham, 2-Jul-80: VERSION 3.0
    41					; 01	- Change CRSH$ references to CRSH$S.
    42					; 02	- Globalize references to I/O page.
    43					; 03	- Moved global data to seperate module.
    44					;	  Eliminated local data (module can now be made read-only).
    45					; 04	- Correct MUL bugs in SCHCCB.
    46					;	  Do proper dispatch in $LLCDS.
    47					; 05	- Reset .CEXDP properly during scheduler shutdown.
    48					; 06	- Fix references to SCHRT inserted by edit #5.
    49					; 07	- Clear CCB link before dispatching in SCHCCB.
    50					;	  Reset SYNCH block usage flag before dispatching.
    51					; 08	- Update CRSH$S contexts.
    52					; 09	- Add conditional process activation signal to
    53					;	    $DDMDS, $DLCDS, $LLCDS, $SCHRQ.
    54					; 10	- Fix bug introduced in $LLCDS by 09.
    55					;	  Take advantage of process descriptor re-organization.
    56					;	  New signal status codes for process activation.
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 1-1
CEXSCH.M11    30-DEC-82 00:24

    57					; 11	- Remove process activation signals.
    58					;	  Dispatch SYNCH to LLC process, if requested nicely.
    59					; 12	- Add CCB address verification routine.
    60					;	Alan D. Peckham, 9-Dec-80: VERSION 3.1
    61					; 13	- Rework for MCB V3.1
    62					; 14	- Add support for data base words in $PRCDS.
    63					;	Alan D. Peckham, 30-Jan-80: VERSION 3.2
    64					; 15	- Fix bugs introduced in 3.1(14) in SCHSYN.
    65					;	  Support new SYNCH block in SCHSYN.
    66					;	  Merge in CEXLLC routines $LLCRS and $LLCDB.
    67					;	  Support new C.SRC and C.DST in $LLCRS.
    68					;	  Support .CRPDB current process descriptor address.
    69					;	  Change input parameters for $PRCDS.
    70					; 16	- Support .CRDSP in context switches.
    71					;	  Disallow PIX #0 in $SCHED.
    72					; 17	- Added $PAUSE service routine.
    73					;--
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 2
CEXSCH.M11    30-DEC-82 00:24		DECLARATIONS

    75						.SBTTL	DECLARATIONS
    76
    77					;
    78					; INCLUDE FILES:
    79					;
    80
    81						.MCALL	CRSH$S,DSP$B
    82						.GLOBL	$FORK0
    83						.GLOBL	$IGNAL,KISAR5
    84
    85					;
    86					; MACROS:
    87					;
    88					;	None
    89					;
    90					; EQUATED SYMBOLS:
    91					;
    92					;	None
    93					;
    94					; OWN STORAGE:
    95					;
    96
    97						.GLOBL	.PDBNM		; Number of processes.
    98						.GLOBL	.PDBVB		; Process descriptor vector.
    99						.GLOBL	.PDBVE		; End of process descriptor vector.
   100
   101						.GLOBL	.FRKBK		; Address of Comm/Exec fork block.
   102						.GLOBL	.CEXDP		; Comm/Exec processing level:
   103									;  <0	RSX level
   104									;   0	Process level
   105									;  >0	Interrupt level
   106						.GLOBL	.CEXRQ		; MCB scheduling requested.
   107						.GLOBL	.RSXMP		; Saved RSX mapping to APR 6.
   108
   109						.GLOBL	.SYNQH		; SYNCH queue.
   110						.GLOBL	.CBLQH		; CCB queue, to lower level process.
   111						.GLOBL	.CBHQH		; CCB queue, to higher level process.
   112						.GLOBL	.CRPDB		; Current process descriptor.
   113						.GLOBL	.CRDAT		; Current data base bias/address
   114						.GLOBL	.CRPIX		; Current process index.
   115
   116		000000'				.PSECT	$PLIT$,D,RO
   117	000000'				.DSPCR::DSP$B			; CCB dispatch crash table:
   118	000000'					DSP$	FC.AST		;  FC.AST
   119	000002'					DSP$	FC.XME		;  FC.XME
   120	000004'					DSP$	FC.RCE		;  FC.RCE
   121	000006'					DSP$	FC.KIL		;  FC.KIL
   122	000010'					DSP$	FC.CTL		;  FC.CTL
   123	000012'					DSP$	FC.TIM,DSPRT	;  FC.TIM
   124	000014'					DSP$	FC.XCP		;  FC.XCP
   125	000016'					DSP$	FC.RCP		;  FC.RCP
   126	000020'					DSP$	FC.KCP		;  FC.KCP
   127	000022'					DSP$	FC.CCP		;  FC.CCP
   128	000024'					DSP$E
   129
   130					;
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 2-1
CEXSCH.M11    30-DEC-82 00:24		DECLARATIONS

   131					; VALIDATION DECLARATIONS:
   132					;
   133						.IIF	NE,<Z.DSP-0>,.ERROR Z.DSP; Must be first words in PD
   134						.IIF	NE,<Z.DAT-4-Z.DSP>,.ERROR Z.DAT; must follow Z.DSP words
   135						.IIF	NE,<Z.PIX-4-Z.DAT>,.ERROR Z.PIX; Must follow Z.DAT words
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 3
CEXSCH.M11    30-DEC-82 00:24		$CCBCK - VERIFY CCB ADDRESS

   137						.SBTTL	$CCBCK - Verify CCB address
   138					;++
   139					; FUNCTIONAL DESCRIPTION:
   140					;
   141					;	Spring a SIGNAL_STOP if the CCB address is not within
   142					;	range of the allocated DSR memory blocks.
   143					;
   144					; CALLING SEQUENCE:
   145					;
   146					;	CALL	$CCBCK
   147					;
   148					; INPUT PARAMETERS:
   149					;
   150					;	R4 = Address of CCB to verify.
   151					;
   152					; IMPLICIT INPUTS:
   153					;
   154					;	.CCBDM = address/length of DSR allocated for CCBs.
   155					;	.RDBDM = address/length of DSR allocated for RDB CCBs.
   156					;
   157					; OUTPUT PARAMETERS:
   158					;
   159					;	None
   160					;
   161					; IMPLICIT OUTPUTS:
   162					;
   163					;	None
   164					;
   165					; CONDITION CODES:
   166					;
   167					;	None
   168					;
   169					; SIDE EFFECTS:
   170					;
   171					;	None
   172					;--
   173
   174		000000'				.PSECT	$CODE$,I,RO
   175		   001				.IF	NE,D$$BUG
   176					$CCBCK::PUSH$S	R4		; Check if a CCB/CCB
   177						SUB	.CCBDM+0,(SP)
   178						CMP	.CCBDM+2,(SP)+
   179						BHI	90$
   180						PUSH$S	R4		; or a RDB/CCB.
   181						SUB	.RDBDM+0,(SP)
   182						CMP	.RDBDM+2,(SP)+
   183						BLO	100$
   184					90$:	RETURN
   185
   186					100$:	TST	(SP)+
   187						CRSH$S	CBR		; Invalid CCB address.
   188		   000				.ENDC
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 4
CEXSCH.M11    30-DEC-82 00:24		$CCBQH - QUEUE CCB TO HIGHER LEVEL

   190						.SBTTL	$CCBQH - Queue CCB to Higher Level
   191					;++
   192					; FUNCTIONAL DESCRIPTION:
   193					;
   194					;	Place the given CCB on the .CBHQH queue.
   195					;
   196					; CALLING SEQUENCE:
   197					;
   198					;	CALL	$CCBQH
   199					;
   200					; INPUT PARAMETERS:
   201					;
   202					;	R4 = Address of CCB to queue.
   203					;
   204					; IMPLICIT INPUTS:
   205					;
   206					;	.CBHQH = CCB queue list header.
   207					;
   208					; OUTPUT PARAMETERS:
   209					;
   210					;	None
   211					;
   212					; IMPLICIT OUTPUTS:
   213					;
   214					;	None
   215					;
   216					; CONDITION CODES:
   217					;
   218					;	None
   219					;
   220					; SIDE EFFECTS:
   221					;
   222					;	Register R4 is not preserved.
   223					;--
   224
   225		000000'				.PSECT	$CODE$,I,RO
   226	000000'	004367	000010		$CCBQH::JSR	R3,CCBQ		; Queue the CCB
   227	000004'	000000G				.WORD	.CBHQH		; to the .CBHQH queue.
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 5
CEXSCH.M11    30-DEC-82 00:24		$CCBQL - QUEUE CCB TO LOWER LEVEL

   229						.SBTTL	$CCBQL - Queue CCB to Lower Level
   230					;++
   231					; FUNCTIONAL DESCRIPTION:
   232					;
   233					;	Place the given CCB on the .CBLQH queue.
   234					;
   235					; CALLING SEQUENCE:
   236					;
   237					;	CALL	$CCBQL
   238					;
   239					; INPUT PARAMETERS:
   240					;
   241					;	R4 = Address of CCB to queue.
   242					;
   243					; IMPLICIT INPUTS:
   244					;
   245					;	.CBLQH = CCB queue list header.
   246					;
   247					; OUTPUT PARAMETERS:
   248					;
   249					;	None
   250					;
   251					; IMPLICIT OUTPUTS:
   252					;
   253					;	None
   254					;
   255					; CONDITION CODES:
   256					;
   257					;	None
   258					;
   259					; SIDE EFFECTS:
   260					;
   261					;	None
   262					;--
   263
   264		000006'				.PSECT	$CODE$,I,RO
   265	000006'	004367	000002		$CCBQL::JSR	R3,CCBQ
   266	000012'	000000G				.WORD	.CBLQH
   267
   268					;
   269					; Common processor for $CCBQ* routines.
   270					;
   271
   272	000014'	011303			CCBQ:	MOV	(R3),R3		; Get queue address
   273	000016'	004767	000000G			CALL	$CMQIN		; and insert the CCB.
   274	000022'	005267	000000G			INC	.CEXRQ		; Request scheduling
   275	000026'					POP$S	R3		; and restore his R3.
   276	000030'	000207				RETURN
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 6
CEXSCH.M11    30-DEC-82 00:24		$CEXSV	- EXIT FROM COMM/EXEC AND RESCHEDULE IF NECESSARY

   278						.SBTTL	$CEXSV	- Exit from Comm/Exec and Reschedule if Necessary
   279					;++
   280					; FUNCTIONAL DESCRIPTION:
   281					;
   282					;	None
   283					;
   284					; CALLING SEQUENCE:
   285					;
   286					;	None
   287					;
   288					; INPUT PARAMETERS:
   289					;
   290					;	None
   291					;
   292					; IMPLICIT INPUTS:
   293					;
   294					;	None
   295					;
   296					; OUTPUT PARAMETERS:
   297					;
   298					;	None
   299					;
   300					; IMPLICIT OUTPUTS:
   301					;
   302					;	None
   303					;
   304					; CONDITION CODES:
   305					;
   306					;	None
   307					;
   308					; SIDE EFFECTS:
   309					;
   310					;	None
   311					;--
   312
   313		000032'				.PSECT	$CODE$,I,RO
   314	000032'	005267	000000G		$CEXSV::INC	.CEXDP		; become the Comm/Exec,
   315	000036'	001003				BNE	90$
   316	000040'					SMAP$	.RSXMP		; and save APR 6.
   317	000046'	000207			90$:	RETURN
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 7
CEXSCH.M11    30-DEC-82 00:24		$CEXXT	- EXIT FROM COMM/EXEC AND RESCHEDULE IF NECESSARY

   319						.SBTTL	$CEXXT	- Exit from Comm/Exec and Reschedule if Necessary
   320					;++
   321					; FUNCTIONAL DESCRIPTION:
   322					;
   323					;	None
   324					;
   325					; CALLING SEQUENCE:
   326					;
   327					;	None
   328					;
   329					; INPUT PARAMETERS:
   330					;
   331					;	None
   332					;
   333					; IMPLICIT INPUTS:
   334					;
   335					;	None
   336					;
   337					; OUTPUT PARAMETERS:
   338					;
   339					;	None
   340					;
   341					; IMPLICIT OUTPUTS:
   342					;
   343					;	None
   344					;
   345					; CONDITION CODES:
   346					;
   347					;	None
   348					;
   349					; SIDE EFFECTS:
   350					;
   351					;	None
   352					;--
   353
   354		000050'				.PSECT	$CODE$,I,RO
   355	000050'	005367	000000G		$CEXXT::DEC	.CEXDP		;; If really exiting
   356	000054'	100020				BPL	80$		;; then
   357	000056'					MAP$	.RSXMP		;; restore APR 6.
   358	000064'	005767	000000G			TST	.CEXRQ		;; If requests are outstanding
   359	000070'	001412				BEQ	80$		;; then
   360	000072'					DSABL$			;; disable interrupts.
   361	000104'	016704	000000G			MOV	.FRKBK,R4	;; Get fork block address
   362	000110'	001003				BNE	60$		;;; and if active
   363	000112'					ENABL$			;;; reenable interrupts
   364	000116'	000207			80$:	RETURN			;; and go away.
   365
   366	000120'	005067	000000G		60$:	CLR	.FRKBK		;;; Stake our claim,
   367	000124'					ENABL$			;;; reenable interrupts,
   368	000130'					PUSH$S	(R4)+		;; push the scheduler address
   369	000132'	000167	000000G			JMP	$FORK0		;; and schedule the fork.
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 8
CEXSCH.M11    30-DEC-82 00:24		$CRSH	- SET UP COMM/EXEC CRASH

   371						.SBTTL	$CRSH	- Set up Comm/Exec crash
   372					;++
   373					; FUNCTIONAL DESCRIPTION:
   374					;
   375					;	None
   376					;
   377					; CALLING SEQUENCE:
   378					;
   379					;	None
   380					;
   381					; INPUT PARAMETERS:
   382					;
   383					;	None
   384					;
   385					; IMPLICIT INPUTS:
   386					;
   387					;	None
   388					;
   389					; OUTPUT PARAMETERS:
   390					;
   391					;	None
   392					;
   393					; IMPLICIT OUTPUTS:
   394					;
   395					;	None
   396					;
   397					; CONDITION CODES:
   398					;
   399					;	None
   400					;
   401					; SIDE EFFECTS:
   402					;
   403					;	None
   404					;--
   405
   406		000136'				.PSECT	$CODE$,I,RO
   407	000136'				$CRSH::	PUSH$S	<@(SP)+,#1>	; Get the status code and arg count
   408	000144'	004767	000000G			CALL	$IGNAL		; and signal the exception.
   409	000150'					POP$S	,2		; remove the parameters
   410	000152'	000207				RETURN			; and return control to the user.
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 9
CEXSCH.M11    30-DEC-82 00:24		$DSPCR - UNDEFINED CCB DISPATCH CRASH

   412						.SBTTL	$DSPCR - Undefined CCB Dispatch Crash
   413					;++
   414					; FUNCTIONAL DESCRIPTION:
   415					;
   416					;	Crash entry point for undefined dispatch vector entries.
   417					;
   418					; CALLING SEQUENCE:
   419					;
   420					;	CALL	$DSPCR
   421					;
   422					; INPUT PARAMETERS:
   423					;
   424					;	None
   425					;
   426					; IMPLICIT INPUTS:
   427					;
   428					;	None
   429					;
   430					; OUTPUT PARAMETERS:
   431					;
   432					;	None
   433					;
   434					; IMPLICIT OUTPUTS:
   435					;
   436					;	None
   437					;
   438					; CONDITION CODES:
   439					;
   440					;	None
   441					;
   442					; SIDE EFFECTS:
   443					;
   444					;	None
   445					;--
   446
   447		000154'				.PSECT	$CODE$,I,RO
   448	000154'				$DSPCR::CRSH$S	DSP		; Illegal CCB dispatch
   449
   450	000162'	000207			DSPRT:	RETURN			; (for FC.TIM dispatch)
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 10
CEXSCH.M11    30-DEC-82 00:24		$ILVCK - VERIFY PROCESSING AT INTERRUPT LEVEL

   452						.SBTTL	$ILVCK - Verify processing at interrupt level
   453					;++
   454					; FUNCTIONAL DESCRIPTION:
   455					;
   456					;	Crash is not at interrupt processing level.
   457					;
   458					; CALLING SEQUENCE:
   459					;
   460					;	CALL	$ILVCK
   461					;
   462					; INPUT PARAMETERS:
   463					;
   464					;	None
   465					;
   466					; IMPLICIT INPUTS:
   467					;
   468					;	.CEXDP = Comm/Exec processing level.
   469					;
   470					; OUTPUT PARAMETERS:
   471					;
   472					;	None
   473					;
   474					; IMPLICIT OUTPUTS:
   475					;
   476					;	None
   477					;
   478					; CONDITION CODES:
   479					;
   480					;	None
   481					;
   482					; SIDE EFFECTS:
   483					;
   484					;	None
   485					;--
   486
   487		000164'				.PSECT	$CODE$,I,RO
   488		   001				.IF	NE,D$$BUG
   489					$ILVCK::TST	.INTCB		; If not in interrupt
   490						BEQ	100$		; then crash.
   491						RETURN
   492
   493					100$:	TST	(SP)+
   494						CRSH$S	ILV		; Routine must be called at interrupt level
   495		   000				.ENDC
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 11
CEXSCH.M11    30-DEC-82 00:24		$PAUSE - PAUSE IN EXECUTION OF PROCESS.

   497						.SBTTL	$PAUSE - Pause in execution of process.
   498					;++
   499					; FUNCTIONAL DESCRIPTION:
   500					;
   501					;	This routine is provided to processes in order to allow them
   502					;	to suspend processing during time consuming operations.  This
   503					;	allows accumulated SYNCHs to be dispatched.  The resume address
   504					;	is saved in the provided SYNCH block and it is rescheduled.
   505					;
   506					; CALLING SEQUENCE:
   507					;
   508					;	CALL	$PAUSE
   509					;
   510					; INPUT PARAMETERS:
   511					;
   512					;	R4 = address of synch block containing:
   513					;	    S.DSP = Routine to call on resumption.
   514					;
   515					; IMPLICIT INPUTS:
   516					;
   517					;	None
   518					;
   519					; OUTPUT PARAMETERS:
   520					;
   521					;	None
   522					;
   523					; IMPLICIT OUTPUTS:
   524					;
   525					;	None
   526					;
   527					; CONDITION CODES:
   528					;
   529					;	None
   530					;
   531					; SIDE EFFECTS:
   532					;
   533					;	None
   534					;--
   535
   536		000164'				.PSECT	$CODE$,I,RO
   537	000164'				$PAUSE::PLVL$			; Crash if not at process level.
   538
   539		   001				.IF	NE,D$$BUG
   540						TST	S.PDB(R4)	; If SYNCH block is active
   541						BNE	100$		; then crash about it,
   542						.IFTF
   543
   544	000164'	016764	000000G	000002		MOV	.CRPDB,S.PDB(R4) ; otherwise set PDB
   545	000172'	005014				CLR	(R4)		; Reset the link pointer.
   546	000174'					DSABL$			; No interrupts, please!
   547	000206'	010477	000002G			MOV	R4,@.SYNQH+2	;;; Link to last block
   548	000212'	010467	000002G			MOV	R4,.SYNQH+2	;;; and make this the last block.
   549	000216'					ENABL$			;;; reenable interrupts
   550	000222'	005267	000000G			INC	.CEXRQ		; indicate scheduling requested
   551	000226'	000207				RETURN			; and go away.
   552
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 11-1
CEXSCH.M11    30-DEC-82 00:24		$PAUSE - PAUSE IN EXECUTION OF PROCESS.

   553						.IFT
   554					100$:	CRSH$S	SYN		; and say SYNCH block already active.
   555		   000				.ENDC
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 12
CEXSCH.M11    30-DEC-82 00:24		$PLVCK - VERIFY PROCESSING AT PROCESS LEVEL

   557						.SBTTL	$PLVCK - Verify processing at process level
   558					;++
   559					; FUNCTIONAL DESCRIPTION:
   560					;
   561					;	Crash if not at process level.
   562					;
   563					; CALLING SEQUENCE:
   564					;
   565					;	CALL	$PLVCK
   566					;
   567					; INPUT PARAMETERS:
   568					;
   569					;	None
   570					;
   571					; IMPLICIT INPUTS:
   572					;
   573					;	.CEXDP = Comm/Exec processing level.
   574					;
   575					; OUTPUT PARAMETERS:
   576					;
   577					;	None
   578					;
   579					; IMPLICIT OUTPUTS:
   580					;
   581					;	None
   582					;
   583					; CONDITION CODES:
   584					;
   585					;	None
   586					;
   587					; SIDE EFFECTS:
   588					;
   589					;	None
   590					;--
   591
   592		000230'				.PSECT	$CODE$,I,RO
   593		   001				.IF	NE,D$$BUG
   594					$PLVCK::TST	.INTCB		; If in interrupt
   595						BNE	100$		; or
   596						TST	.CEXDP		; not at process level
   597						BNE	100$		; then crash.
   598						RETURN
   599
   600					100$:	TST	(SP)+
   601						CRSH$S	PLV		; Routine must be called at process level
   602		   000				.ENDC
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 13
CEXSCH.M11    30-DEC-82 00:24		$PRCDS - DISPATCH TO A PROCESS

   604						.SBTTL	$PRCDS - Dispatch to a Process
   605					;++
   606					; FUNCTIONAL DESCRIPTION:
   607					;
   608					;	Set up the context and dispatch to process servicing the
   609					;	given data base.
   610					;
   611					; CALLING SEQUENCE:
   612					;
   613					;	CALL	$PRCDS
   614					;
   615					; INPUT PARAMETERS:
   616					;
   617					;	R3 = Function modifier.
   618					;	R2 = Function code.
   619					;	R0 = Process descriptor block.
   620					;
   621					; IMPLICIT INPUTS:
   622					;
   623					;	None
   624					;
   625					; OUTPUT PARAMETERS:
   626					;
   627					;	None
   628					;
   629					; IMPLICIT OUTPUTS:
   630					;
   631					;	KISAR5 = mapped to the CEX process.
   632					;
   633					; CONDITION CODES:
   634					;
   635					;	None
   636					;
   637					; SIDE EFFECTS:
   638					;
   639					;	Registers R0 through R5 and KISAR6 are not preserved.
   640					;--
   641
   642		000230'				.PSECT	$CODE$,I,RO
   643	000230'	010067	000000G		$PRCDS::MOV	R0,.CRPDB	; Set current process
   644	000234'	012037	000000G			MOV	(R0)+,@#KISAR5	; process mapping bias,
   645	000240'	061002				ADD	(R0),R2		; dispatch vector,
   646	000242'	012067	000000G			MOV	(R0)+,.CRDSP
   647	000246'					MAP$	(R0)		; data base bias,
   648	000252'	012067	000000G			MOV	(R0)+,.CRDAT+0
   649	000256'	011005				MOV	(R0),R5		; address,
   650	000260'	012067	000002G			MOV	(R0)+,.CRDAT+2
   651	000264'	111067	000000G			MOVB	(R0),.CRPIX	; and index.
   652	000270'	004732				CALL	@(R2)+		; let process do its thing,
   653	000272'	016701	000000G			MOV	.CRPDB,R1	; recover
   654	000276'	005721				TST	(R1)+
   655	000300'	016721	000000G			MOV	.CRDSP,(R1)+	; dispatch address
   656	000304'	016721	000000G			MOV	.CRDAT+0,(R1)+	; data base
   657	000310'	016711	000002G			MOV	.CRDAT+2,(R1)	; bias/address
   658	000314'	017737	000000G	000000G		MOV	@.PDBVB,@#KISAR5 ; and return to the CEX process.
   659	000322'	000207				RETURN
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 14
CEXSCH.M11    30-DEC-82 00:24		$RLVCK - VERIFY PROCESSING AT RSX LEVEL

   661						.SBTTL	$RLVCK - Verify processing at RSX level
   662					;++
   663					; FUNCTIONAL DESCRIPTION:
   664					;
   665					;	Crash if Comm/Exec is active (not doing RSX stuff).
   666					;
   667					; CALLING SEQUENCE:
   668					;
   669					;	CALL	$RLVCK
   670					;
   671					; INPUT PARAMETERS:
   672					;
   673					;	None
   674					;
   675					; IMPLICIT INPUTS:
   676					;
   677					;	.CEXDP = Comm/Exec processing level.
   678					;
   679					; OUTPUT PARAMETERS:
   680					;
   681					;	None
   682					;
   683					; IMPLICIT OUTPUTS:
   684					;
   685					;	None
   686					;
   687					; CONDITION CODES:
   688					;
   689					;	None
   690					;
   691					; SIDE EFFECTS:
   692					;
   693					;	None
   694					;--
   695
   696		000324'				.PSECT	$CODE$,I,RO
   697		   001				.IF	NE,D$$BUG
   698					$RLVCK::TST	.INTCB		; If in interrupt
   699						BNE	100$		; or
   700						TST	.CEXDP		; not in RSX
   701						BGE	100$		; then crash.
   702						RETURN
   703
   704					100$:	TST	(SP)+
   705						CRSH$S	RLV		; Routine must be called at RSX level
   706		   000				.ENDC
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 15
CEXSCH.M11    30-DEC-82 00:24		$SCHED - QUEUE CCB TO DESTINATION PROCESS

   708						.SBTTL	$SCHED - Queue CCB to destination process
   709					;++
   710					; FUNCTIONAL DESCRIPTION:
   711					;
   712					;	Queue the given CCB chain to the specified process.
   713					;
   714					;	The following information will be inserted into the
   715					;	CCB and may be examined by the destination LLC:
   716					;	    C.PIX	<process index of the source process>
   717					;	    C.OWN	<destination process index> (FC.AST only)
   718					;
   719					; CALLING SEQUENCE:
   720					;
   721					;	CALL	$SCHED
   722					;
   723					; INPUT PARAMETERS:
   724					;
   725					;	R4 = Address of CCB chain, the first containing:
   726					;		C.FNC	Function code.
   727					;		C.MOD	Function modifier.
   728					;		C.PIX	Process index of destination process.
   729					;
   730					; IMPLICIT INPUTS:
   731					;
   732					;	None
   733					;
   734					; OUTPUT PARAMETERS:
   735					;
   736					;	None
   737					;
   738					; IMPLICIT OUTPUTS:
   739					;
   740					;	None
   741					;
   742					; CONDITION CODES:
   743					;
   744					;	None
   745					;
   746					; SIDE EFFECTS:
   747					;
   748					;	Register R4 is not preserved.
   749					;--
   750
   751		000324'				.PSECT	$CODE$,I,RO
   752	000324'				$SCHED::PLVL$			; Crash if not at process level.
   753	000324'					CCBCK$
   754	000324'					PUSH$S	R1
   755	000326'	116401	000011			MOVB	C.PIX(R4),R1
   756
   757		   001				.IF	NE,D$$BUG
   758						BEQ	100$		; If process index
   759						CMPB	.PDBNM,R1	; out of range
   760						BLOS	100$		; then crash.
   761						.IFTF
   762
   763	000332'	006301				ASL	R1
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 15-1
CEXSCH.M11    30-DEC-82 00:24		$SCHED - QUEUE CCB TO DESTINATION PROCESS

   764	000334'	016101	000000G			MOV	.PDBVB(R1),R1
   765
   766						.IFT
   767						BEQ	100$
   768						.IFTF
   769
   770	000340'	010164	000036			MOV	R1,C.DST(R4)	; Set destination
   771	000344'	105764	000012			TSTB	C.FNC(R4)	; and if AST function
   772	000350'	001003				BNE	10$		; then
   773	000352'	116164	000010	000006		MOVB	Z.PIX(R1),C.OWN(R4) ; give CCB to him.
   774	000360'				10$:	POP$S	R1
   775	000362'	016764	000000G	000040		MOV	.CRPDB,C.SRC(R4) ; Set source process descriptor.
   776	000370'	116764	000000G	000011		MOVB	.CRPIX,C.PIX(R4)
   777	000376'	000167	177376			JMP	$CCBQH		; Queue the CCB.
   778
   779						.IFT
   780					100$:	POP$S	R1
   781						CRSH$S	PIX		; Process index out of range
   782		   000				.ENDC
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 16
CEXSCH.M11    30-DEC-82 00:24		$SYNDS - SYNCH TO A PROCESS

   784						.SBTTL	$SYNDS - SYNCH to a Process
   785					;++
   786					; FUNCTIONAL DESCRIPTION:
   787					;
   788					;	Set up the context and dispatch to process servicing the
   789					;	given data base.
   790					;
   791					; CALLING SEQUENCE:
   792					;
   793					;	CALL	$SYNDS
   794					;
   795					; INPUT PARAMETERS:
   796					;
   797					;	R2 = Dispatch address.
   798					;	R0 = Process descriptor block.
   799					;
   800					; IMPLICIT INPUTS:
   801					;
   802					;	None
   803					;
   804					; OUTPUT PARAMETERS:
   805					;
   806					;	None
   807					;
   808					; IMPLICIT OUTPUTS:
   809					;
   810					;	KISAR5 = mapped to the CEX process.
   811					;
   812					; CONDITION CODES:
   813					;
   814					;	None
   815					;
   816					; SIDE EFFECTS:
   817					;
   818					;	Registers R0 through R5 and KISAR6 are not preserved.
   819					;--
   820
   821		000402'				.PSECT	$CODE$,I,RO
   822	000402'	010067	000000G		$SYNDS::MOV	R0,.CRPDB	; Set current process
   823	000406'	012037	000000G			MOV	(R0)+,@#KISAR5	; process mapping bias,
   824	000412'	012067	000000G			MOV	(R0)+,.CRDSP	; dispatch table,
   825	000416'					MAP$	(R0)		; data base bias,
   826	000422'	012067	000000G			MOV	(R0)+,.CRDAT+0
   827	000426'	011005				MOV	(R0),R5		; address,
   828	000430'	012067	000002G			MOV	(R0)+,.CRDAT+2
   829	000434'	111067	000000G			MOVB	(R0),.CRPIX	; and index.
   830	000440'	004712				CALL	(R2)		; let process do its thing,
   831	000442'	016701	000000G			MOV	.CRPDB,R1	; and
   832	000446'	005721				TST	(R1)+		; recover
   833	000450'	016721	000000G			MOV	.CRDSP,(R1)+	; dispatch address
   834	000454'	016721	000000G			MOV	.CRDAT+0,(R1)+	; data base
   835	000460'	016711	000002G			MOV	.CRDAT+2,(R1)	; bias/address.
   836	000464'	017737	000000G	000000G		MOV	@.PDBVB,@#KISAR5 ; Remap to the CEX process,
   837	000472'	000207				RETURN
   838
   839		000001				.END
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 17
CEXSCH.M11    30-DEC-82 00:24		CROSS REFERENCE TABLE -- USER SYMBOLS

CCBQ    000014R    003	  226	  265	  272#
CE$DSP= ****** G      	  448#
C.DST   000036        	  770*
C.FNC   000012        	  771
C.OWN   000006        	  773*
C.PIX   000011        	  755	  776*
C.SRC   000040        	  775*
DSPRT   000162R    003	  123	  450#
D$$BUG= 000000        	  175	  488	  537	  539	  593	  697	  752	  753	  757
FC.AST= 000000        	  118
FC.CCP= 000022        	  127
FC.CTL= 000010        	  122
FC.KCP= 000020        	  126
FC.KIL= 000006        	  121
FC.RCE= 000004        	  120
FC.RCP= 000016        	  125
FC.TIM= 000012        	  123
FC.XCP= 000014        	  124
FC.XME= 000002        	  119
KISAR5= ****** G      	   83#	  644*	  658*	  823*	  836*
KISAR6= ****** G      	  316#	  357#*	  647#*	  825#*
PS    = ****** G      	  360#*	  363#*	  367#*	  546#*	  549#*
P$$BPS= 000001        	  360	  363	  367	  546	  549
P$$WPS= 000001        	  360	  546
S.PDB   000002        	  544*
Z.DAT   000004        	  134	  135
Z.DSP   000000        	  133	  134
Z.PIX   000010        	  135	  773
$CCBQH  000000RG   003	  226#	  777
$CCBQL  000006RG   003	  265#
$CEXSV  000032RG   003	  314#
$CEXXT  000050RG   003	  355#
$CMQIN= ****** GX     	  273*
$CRSH   000136RG   003	  407#	  448#*
$DSPCR  000154RG   003	  118#	  119#	  120#	  121#	  122#	  124#	  125#	  126#	  127#	  448#
$FORK0= ****** G      	   82#	  369
$IGNAL= ****** G      	   83#	  408*
$PAUSE  000164RG   003	  537#
$PRCDS  000230RG   003	  643#
$SCHED  000324RG   003	  752#
$SYNDS  000402RG   003	  822#
$$TABG= 000000R    002	  117#	  118	  119	  120	  121	  122	  123	  124	  125	  126	  127
.     = 000474R    003	  117	  118	  119	  120	  121	  122	  123	  124	  125	  126	  127
.CBHQH= ****** G      	  111#	  227
.CBLQH= ****** G      	  110#	  266
.CEXDP= ****** G      	  102#	  314*	  355*
.CEXRQ= ****** G      	  106#	  274*	  358	  550*
.CRDAT= ****** G      	  113#	  648*	  650*	  656	  657	  826*	  828*	  834	  835
.CRDSP= ****** GX     	  646*	  655	  824*	  833
.CRPDB= ****** G      	  112#	  544	  643*	  653	  775	  822*	  831
.CRPIX= ****** G      	  114#	  651*	  776	  829*
.DSPCR  000000RG   002	  117#
.FRKBK= ****** G      	  101#	  361	  366*
.PDBNM= ****** G      	   97#
.PDBVB= ****** G      	   98#	  658	  764	  836
.PDBVE= ****** G      	   99#
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 17-1
CEXSCH.M11    30-DEC-82 00:24		CROSS REFERENCE TABLE -- USER SYMBOLS

.RSXMP= ****** G      	  107#	  316*	  357
.SYNQH= ****** G      	  109#	  547*	  548*
CEXSCH - COMM/EXEC SCHEDULER	DNMAC X24.07-563  28-MAY-85  14:22  PAGE 18
CEXSCH.M11    30-DEC-82 00:24		CROSS REFERENCE TABLE -- MACRO NAMES

CCBCK$	  753
CRSH$S	   81#	  448
DSABL$	  360	  546
DSP$	  117#	  118	  119	  120	  121	  122	  123	  124	  125	  126	  127
DSP$B	   81#	  117
DSP$E	  117#	  128
ENABL$	  363	  367	  549
MAP$	  357	  647	  825
MFPS	  360	  546
MTPS	  363	  367	  549
PLVL$	  537	  752
POP$S	  275	  409	  774
PUSH$S	  368	  407	  754
SMAP$	  316


. ABS.  000000     000	   CON   RW    ABS   LCL   I  
        000000     001	   CON   RW    REL   LCL   I  
$PLIT$  000024     002	   CON   RO    REL   LCL   D  
$CODE$  000474     003	   CON   RO    REL   LCL   I  


 ERRORS DETECTED:  0
 DEFAULT GLOBALS GENERATED:  2

 CEXSCH,CEXSCH/CR=MCB:RSXLIB/PA:1,MCBLIB/PA:1,CEX:CEXLIB/PA:1,CEXSCH
 RUN-TIME: 4 2 .3 SECONDS
 RUN-TIME RATIO: 24/6=3.5
 CORE USED:  15K  (29 PAGES)