Google
 

Trailing-Edge - PDP-10 Archives - bb-m080w-sm_t20_v7_0_02_mon_src_mod - monitor-sources/cfspar.mac
There are 13 other files named cfspar.mac in the archive. Click here to see a list.
; UPD ID= 8487, RIP:<7.MONITOR>CFSPAR.MAC.3,   9-Feb-88 12:17:27 by GSCOTT
;TCO 7.1218 - Insert copyright notice.
; UPD ID= 8359, RIP:<7.MONITOR>CFSPAR.MAC.2,  20-Jan-88 11:41:42 by RASPUZZI
;TCO 7.1190 - Move CFS universal stuff out of CFSSRV into CFSPAR.

;	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1988.
;	ALL RIGHTS RESERVED.
;
;	THIS SOFTWARE IS FURNISHED UNDER A  LICENSE AND MAY BE USED AND  COPIED
;	ONLY IN  ACCORDANCE  WITH  THE  TERMS OF  SUCH  LICENSE  AND  WITH  THE
;	INCLUSION OF THE ABOVE  COPYRIGHT NOTICE.  THIS  SOFTWARE OR ANY  OTHER
;	COPIES THEREOF MAY NOT BE PROVIDED  OR OTHERWISE MADE AVAILABLE TO  ANY
;	OTHER PERSON.  NO  TITLE TO  AND OWNERSHIP  OF THE  SOFTWARE IS  HEREBY
;	TRANSFERRED.
;
;	THE INFORMATION IN THIS  SOFTWARE IS SUBJECT  TO CHANGE WITHOUT  NOTICE
;	AND SHOULD  NOT  BE CONSTRUED  AS  A COMMITMENT  BY  DIGITAL  EQUIPMENT
;	CORPORATION.
;
;	DIGITAL ASSUMES NO  RESPONSIBILITY FOR  THE USE OR  RELIABILITY OF  ITS
;	SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL.
	SUBTTL CFSPAR - Parameters for CFS

	SEARCH MONSYM,MACSYM,PROLOG,SCAPAR
;	M. Raspuzzi January 88

	SALL
	UNIVERSAL CFSPAR

	IFE CFSSCA,<CFSDUM==0>	;If no SCA, define this as a dummy as well
	Subttl	Table of Contents

;		     Table of Contents for CFSPAR
;
;				  Section		      Page
;
;
;    1. CFSPAR - Parameters for CFS  . . . . . . . . . . . . .   2
;    2. Data definitions . . . . . . . . . . . . . . . . . . .   4
;    3. Macros . . . . . . . . . . . . . . . . . . . . . . . .  11
;    4. End of CFSPAR  . . . . . . . . . . . . . . . . . . . .  12
	SUBTTL Data definitions

;Special defs

WRTTIM==^D200			;Minimum hold time for token
DIRTIM==^D200			;Minimum hold time for a directory
EQFTIM==^D200			;[7.1072] Minimum hold time for ENQ Lock
MAXHLT==^D3000			;Max time to hold token under demand

RCRDIT==2			;MIN RECEIVE CREDIT
SCRDIT==2			;MIN SEND CREDIT
MAXVWT==5			;MAX TIME (MS) TO WAIT FOR VOTE RESULTS

   IFN CLEQIN,<			;[7.1072] If cluster ENQ code present
ENQQMT==^D10			;[7.1072] Number of extra buffers for ENQSRV
   >				;[7.1072]
   IFE CLEQIN,<			;[7.1072] If cluster ENQ code not present
ENQQMT==0			;[7.1072] No extra buffers for ENQSRV
   >				;[7.1072]
BUFSCT==5+ENQQMT		;[7.1072] # of receive buffers per CFS circuit

   IFN CFSSCA,<
	HSHLEN==^D509		;SIZE OF HASH TABLE (should be prime)
   >	;IFN CFSSCA
   IFE CFSSCA,<
	HSHLEN==^D251
   >	;IFE CFSSCA
   IFN CFSSCA,<			;If SCA present
CFSSLN==^D100			;Size of CFS stack
   >	;IFN CFSSCA
   IFE CFSSCA,<			;If no SCA
CFSSLN==20			; then small private stack needed
   >	;IFE CFSSCA

DMPSLN==^D100			;[7.1021] Size of the dump stack
CFNBC==OFNBC
CFNBSZ==OFNBSZ			;Defs in OFNLEN
;Bits in SCAFLG

	DEFSTR SCRSV,SCAFLG,0,1	;RESTART VOTE BIT
	DEFSTR SCDIS,SCAFLG,1,1 ;Disconnect pending
	DEFSTR SCDDP,SCAFLG,2,1	;Need DDMP soon
	DEFSTR SCCNC,SCAFLG,3,1	;We got connected flag
	DEFSTR SCWKP,SCAFLG,2,3	;Bits to cause a scheduler pass
	DEFSTR SCVER,SCAFLG,4,1	;Set if structure verify needed


;Optional data in connect_request or accept_request

OPDSER==0			;serial number in optional data
OPDTYP==1			;type in optional data,,net number
OPDNAM==2			;first word of name
OPDNEW==3			;last 2 chars of name,,old/new flag
 DEFSTR ONFLG,,31,8		;Old/new byte in optional data
  OF%NEW==0			;Unknown host
  OF%DLY==1			;In dealy for this host
  OF%OLD==2			;It is old

CLCCNT==^D350			;Number to collect when we are desparate
SKDCNT==^D200			;Number to collect in the background
CFSCTM==^D10000
;Definitions for hash table
;Description of a resource block.  Offsets HSHROT and HSHQAL are hashed to
;provide offset into HSHTBL.  Entries that conflict are chained together via
;offsets HSHLNK and HSHBKP.

HSHLNK==0			;OFFSET FOR LINK WORD
HSHROT==1			;ROOT NUMBER
HSHQAL==2			;QUALIFIER
HSHTIM==3			;TIME STAMP OF GRANT
HSFLAG==4			;Offset for the flags
DEFSTR	HSHWVT,4,0,1		;IF ON, WE ARE VOTING
DEFSTR	HSHYES,4,1,1		;YES/NO VOTE (1 if anyone said no)
DEFSTR	HSHTYP,4,5,4		;TYPE OF ENTRY
	.HTPLH==0		;Place-holder entry
	.HTOAD==1		;OWNED FOR FULL SHARING
	.HTOSH==2		;OWNED READ-ONLY SHARED
	.HTOEX==3		;OWNED EXCLUSIVELY
	.HTOPM==4		;OWNED FOR PROMISCOUS READ
DEFSTR	HSHTWF,4,6,1		;"token" wait flag (see CFSUGW)
DEFSTR	HSHRTY,4,7,1		;RETRY NOW BIT
DEFSTR	HSHLSG,4,8,1		;ENTRY BEING RELEASED
DEFSTR	HSHVRS,4,9,1		;VOTE RESTART FLAG
DEFSTR	HSHLOS,4,10,1		;LONG/SHORT FLAG (1 if block is long)
DEFSTR 	HSHUGD,4,11,1		;VOTING FOR AN UPGRADE
DEFSTR	HSHODA,4,12,1		;OPtional data valid
DEFSTR	HSHKPH,4,13,1		;Don't pruge this entry
DEFSTR	HSHVTP,4,17,4		;TYPE WE ARE VOTING ON
DEFSTR	HSHDWT,4,18,1		;If here, waiting for delay to be up
DEFSTR	HSVUC,4,19,1		;Bit to indicate vote must include HSHCOD
DEFSTR	HSHLCL,4,20,1		;Local exclusive
DEFSTR	HSHRFF,4,21,1		;For tokens only
DEFSTR	HSHAVT,4,22,1		;Vote on all nodes, even reduced CFS nodes
DEFSTR 	HSHBTF,4,23,1		;If set, this is a bit-table file
DEFSTR  HSHTAM,4,24,1		;[7247] Cached file access token (cached OFN)
DEFSTR	HSHCNT,4,35,11		;[7247] Count of sharers
HSHCOD==5			;UNIQUE CODE USED FOR ID
HSHPST==6			;POST ADDRESS WHEN RESOURCE IS WITHDRAWN
HSHVWD==7			;Word used by voter
 DEFSTR	HSHLKF,HSHVWD,11,12	;Lock field
 DEFSTR	HSHVCT,HSHVWD,17,6	;VOTE COUNT
 DEFSTR	HSHUNQ,HSHVWD,35,18	;VOTE CODE
HSHVRW==10			;Vote reply word
 DEFSTR HSHDRC,HSHVRW,35,18	;Reason code for denial on NO return to vote
HSHNBT==11			;NODE BIT TABLE
HSHRET==12			;RETURN ADDRESS ON DEASSIGN
HSHDVD==13			;RELEASE VOTE DATA ("Deferred vote data")
 DEFSTR HSHRHN,HSHDVD,17,18	;DEST PORT I.D.
 DEFSTR HSHVVL,HSHDVD,35,18	;VOTE CODE
HSHMSK==14			;Delay mask and fork word
 DEFSTR HSHDLY,HSHMSK,17,18	;Delay mask
 DEFSTR HSHFRK,HSHMSK,35,18	;Owning fork
HSHOPT==HSHMSK+1		;Optional data from vote
HSHOP1==HSHOPT+1		; Second opt data word
HSHOKV==HSHOP1+1		;Call-back when a vote is OKed
HSHCDA==HSHOKV+1		;Call-back when optional data is present in vote
HSHFCT==HSHCDA+1		;Fairness timer
HSHWTM==HSHFCT+1		;revote wait time
HSHBKP==HSHWTM+1		;Back pointer
HSHSIZ==HSHBKP+1		;SIZE OF A HASH ENTRY
HSHBTT==HSHSIZ+1		;FIRST WORD OF BIT TABLE
;Defs for CFS block

NVOTQ==^D4			;# OF VOTE PACKETS TO STOCK FROM FREE SPACE
   IFNDEF CFSDUM,<		;If a real CFS
 NVOTQ0==^D75			;# of packet to get from private stock
   >	;IFNDEF CFSDUM
   IFDEF CFSDUM,<		;If a reduced CFS
 NVOTQ0==^D10			;Just get a few
   >	;IFNDEF CFSDUM


;Contents of a packet sent via SCA.

SCALEN==.MHSTS+1		;First word past SCA header

DEFSTR CFFLG,SCALEN,11,12	;Flags
 DEFSTR CFODA,SCALEN,0,1	;Opt data present
 DEFSTR CFVUC,SCALEN,1,1	;Vote to include HSHCOD
DEFSTR CFCOD,SCALEN,17,6	;OPCODE FOR VOTING
	.CFVOT==1		;VOTER
	.CFREP==2		;REPLY TO VOTE
	.CFRFR==3		;RESOURCE FREED
	.CFCEZ==4		;SEIZE RESOURCE
	.CFBOW==5		;Broadcast OFN change
	.CFBEF==6		;Broadcast EOF
	.CFTAD==7		;Time and date arrived
	.CFSHT==10		;Shutdown of system is pending
   IFN CLEQIN,<			;[7.1072] If cluster ENQ code present
	.CFENQ==:11		;[7.1072] Cluster ENQ message
.CFMAX==11			;[7.1072] Maximum function code when ENQ present
   >				;[7.1072]
   IFE CLEQIN,<			;[7.1072] If no cluster ENQ code present
.CFMAX==10			;[7.1072] Maximum function code without ENQ code
   >				;[7.1072]
DEFSTR CFUNQ,SCALEN,35,18	;NUMBER OF THIS VOTE OR REQ UNIQUE CODE
CFROT==SCALEN+1			;ROOT CODE FOR THIS VOTE
CFQAL==SCALEN+2			;QUALIFIER CODE FOR THIS VOTE
CFTYP==SCALEN+3			;Access required, or answer
CFDAT==SCALEN+4			;Optional data, it present
CFDT1==SCALEN+5
CFDST0==CFDT1+1			;STR free count in bit table
CFDST1==CFDST0+1		;Transaction count of CFDST0
CFVGRD==CFDST1+1		;Guard word,,Denial reason code
 DEFSTR CFGWD,CFVGRD,17,18	;Unique value - used for debugging
 DEFSTR CFDRC,CFVGRD,35,18	;Field for reason code returned with a NO
	.CDDWT==1		;Denied - we are in VOTDWT
	.CDVUC==2		;Denied - HSHCODs are unequal
	.CDYUX==3		;Denied - voting, HSHYES, we have .HTOEX
	.CDYUN==4		;Denied - voting, HSHYES, unequal access
	.CDVDL==5		;Denied - voting, HSHDLY set
	.CDVLN==6		;Denied - voting, tie, our serial # bigger
	.CDVUX==7		;Denied - voting, tie, HSHUGD, he wants .HTOEX
	.CDVUN==10		;Denied - voting, tie, HSHUGD, unequal access
	.CDOCT==11		;Denied - we own, conflicting access, HSHCNT
	.CDOFC==12		;Denied - we own, conflicting access, HSHFCT

;Values in CFTYP reply:
;	0	OK
;	-1	OK with delay (see call to CFSRMX in CFSRTV)
;	-2	Conditional OK (set when DDMP finishes with delayed yes in CFSFOD)
;	1	NO

VOTSIZ==CFVGRD+1		;Actual size of a packet
VOTSZB==VOTSIZ-1		;SIZE OF BUFFER IN BYTES
 VOTLEN==NVOTQ0*VOTSIZ		;words on all vote packets
;Definitions of "resource names"
;These values are used as qualifiers in numbered resources

DRBASE==<17777,,0>		;DIR BASE OFFSET for DIRECTORY locks
DRBAS0==<37777,,0>		;Allocation table offset for allocation
FILEWL==DSKAB_1			;File write lock (frozen writer)
FILEWT==DSKAB_3			;Access token bias
STRCTK==5B2			;Structure designator
STRCTN==<-2,,0>-DSKAB		;Name register
FILEEQ==DSKAB_2			;File enqueue token
EQLROT==<57777,,0>		;[7.1072] Root for ENQ Database Lock
EQLQAL==<67777,,0>		;[7.1072] Qualifier for ENQ Database Lock
CFJBAS==<47777,,0>		;Base for job number assignment

;Random definitions

DEFSTR STCRA,CFHSTS,17,1	;Bit to control "credit available"
	SUBTTL	Macros

;CFS interlock macros

;The CFS interlock exists to insure that the CFS hash table
;does not change.

   DEFINE CFSINO <
	CALL SCAPOL
   >

;MACRO to test if the structure is part of CFS or is local to this machine.
;	T1/	Structure number

   DEFINE TSTRMT <
	CALL RMT.TS
   >


;macro to save P1-P5

   DEFINE SAVEP5,<
	JSP CX,SAVP5>
	SUBTTL End of CFSPAR

	END