-+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+ X lock.dsc$w_length = sizeof(devlcknam); X lock.dsc$a_pointer = devlcknam; X code = DVI$_DEVLOCKNAM; X status = lib$getdvi(&code, 0, &device, 0, &lock, &len); X if (status != SS$_NORMAL) lib$stop(status); X X code = DVI$_DEVCHAR; X status = lib$getdvi(&code, 0, &device, &sts, 0, 0); X if (status != SS$_NORMAL) lib$stop(status); X X if (sts.dev$v_mnt && !sts.dev$v_for) `7B X for (j = 0, c = &devlcknam`5Blen - 3`5D; j < VOLCKNAMSIZ; j++) X disktab`5Bi`5D.lcknam`5Bj`5D = *c - (*(c--) > '9' ? ('A' - 1 V0) : '0') + X ((*c - (*(c--) > '9' ? ('A' - 10) : '0')) << V 4); X disktab`5Bi`5D.lcknam`5Bj`5D = 0; X disktab`5Bi`5D.indoff = header_offset(disktab`5Bi`5D.devnam); X i++; X `7D X `7D X return(i); X`7D $ CALL UNPACK [.LKSTAT]LKSTAT.C;1 191472654 $ create 'f' X#define RSB$M_DIRENTRY 1 X#define RSB$M_VALINVLD 2 X#define RSB$M_DIR_RQD 4 X#define RSB$M_RM_PEND 8 X#define RSB$M_RM_IP 16 X#define RSB$M_RM_ACCEPT 32 X#define RSB$M_RM_RBLD 64 X#define RSB$M_RM_WAIT 128 X#define RSB$M_RM_DEFLECT 256 X#define RSB$M_DIR_IP 512 X#define RSB$M_RBLD_IP 1024 X#define RSB$M_RBLD_RQD 2048 X#define RSB$M_RBLD_ACT 4096 X#define RSB$M_CHK_BTR 8192 X#define RSB$K_LENGTH 112 X#define RSB$C_LENGTH 112 X#define RSB$K_MAXLEN 31 X#define RSB$S_RSBDEF 112 X `20 X#pragma nostandard Xstruct rsb `7B X unsigned long rsb$l_hshchn; /* hash chain V `20 X*/ X unsigned long rsb$l_hshchnbk; /* hash chain back pointer V `20 X*/ X unsigned short rsb$w_size; /* size of rsb V `20 X*/ X unsigned char rsb$b_type; /* structure type V `20 X*/ X unsigned char rsb$b_depth; /* depth in tree V `20 X*/ X unsigned char rsb$b_ggmode; /* group grant mode V `20 X*/ X unsigned char rsb$b_cgmode; /* conversion grant mode V `20 X*/ X variant_union `7B V `20 X unsigned short rsb$w_status; /* status V `20 X*/ X variant_struct `7B V `20 X unsigned rsb$v_direntry : 1; /* entered in dir during failove Vr X*/ X unsigned rsb$v_valinvld : 1; /* value block invalid V `20 X*/ X unsigned rsb$v_dir_rqd : 1; /* directory entry required V `20 X*/ X unsigned rsb$v_rm_pend : 1; /* resource remaster op pending V `20 X*/ X unsigned rsb$v_rm_ip : 1; /* resource being remastered V `20 X*/ X unsigned rsb$v_rm_accept : 1; /* new master accepts V `20 X*/ X unsigned rsb$v_rm_rbld : 1; /* always rebuild tree V `20 X*/ X unsigned rsb$v_rm_wait : 1; /* block local activity V `20 X*/ X unsigned rsb$v_rm_deflect : 1; /* deflect remote interest V `20 X*/ X unsigned rsb$v_dir_ip : 1; /* directory entry being created V`20 X*/ X unsigned rsb$v_rbld_ip : 1; /* rebuild in progress V `20 X*/ X unsigned rsb$v_rbld_rqd : 1; /* rebuild required for this tre Ve X*/ X unsigned rsb$v_rbld_act : 1; /* lock rbld active for tree V `20 X*/ X unsigned rsb$v_chk_btr : 1; /* check for better master V `20 X*/ X unsigned rsb$v_fill : 2; V `20 X `7D rsb$r_status_bits; V `20 X `7D rsb$r_status_overlay; V `20 X unsigned long rsb$l_grqfl; /* granted queue forward link V `20 X*/ X unsigned long rsb$l_grqbl; /* granted queue backward link V `20 X*/ X unsigned long rsb$l_cvtqfl; /* conversion queue forward link V `20 X*/ X unsigned long rsb$l_cvtqbl; /* conversion queue backward link V`20 X*/ X unsigned long rsb$l_wtqfl; /* wait queue forward link V `20 X*/ X unsigned long rsb$l_wtqbl; /* wait queue backward link V `20 X*/ X unsigned long rsb$l_valblk`5B4`5D; /* value block V `20 X*/ X unsigned long rsb$l_csid; /* system id of master sys. V `20 X*/ X unsigned long rsb$l_rrsfl; /* root list forward link V `20 X*/ X unsigned long rsb$l_rrsbl; /* root list backward link V `20 X*/ X unsigned long rsb$l_srsfl; /* tree list forward link V `20 X*/ X unsigned long rsb$l_srsbl; /* tree list backward link V `20 X*/ X unsigned long rsb$l_rm_csid; /* pendng remaster csid V `20 X*/ X unsigned long rsb$l_rtrsb; /* pointer to root rsb V `20 X*/ X unsigned long rsb$l_clurcb; /* remaster control block V `20 X*/ X unsigned short rsb$w_activity; /* resource activity counter V `20 X*/ X unsigned short rsb$w_lckcnt; /* count of locks on resource V `20 X*/ X unsigned long rsb$l_valseqnum; /* value block seq. number V `20 X*/ X unsigned short rsb$w_refcnt; /* sub rsb reference count V `20 X*/ X unsigned short rsb$w_blkastcnt; /* blocking ast count V `20 X*/ X unsigned short rsb$w_hashval; /* hash value V `20 X*/ X unsigned short rsb$w_rqseqnm; /* request sequence number V `20 X*/ X unsigned long rsb$l_parent; /* address of parent rsb V `20 X*/ X unsigned short rsb$w_group; /* group number V `20 X*/ X unsigned char rsb$b_rmod; /* access mode of resource V `20 X*/ X unsigned char rsb$b_rsnlen; /* resource name length V `20 X*/ X unsigned char rsb$t_resnam`5BRSB$K_MAXLEN`5D; /* start of resource V name X*/ X`7D; `20 X#pragma standard X X X#define LKB$M_PKAST 16 X#define LKB$M_NODELETE 32 X#define LKB$M_QUOTA 64 X#define LKB$M_KAST 128 X#define LKB$M_DCPLAST 1 X#define LKB$M_DBLKAST 2 X#define LKB$M_ASYNC 4 X#define LKB$M_BLKASTQED 8 X#define LKB$M_MSTCPY 16 X#define LKB$M_NOQUOTA 32 X#define LKB$M_TIMOUTQ 64 X#define LKB$M_WASSYSOWN 128 X#define LKB$M_CVTTOSYS 256 X#define LKB$M_PROTECT 512 X#define LKB$M_RESEND 1024 X#define LKB$M_RM_RBRQD 2048 X#define LKB$M_FLOCK 4096 X#define LKB$M_IP 8192 X#define LKB$K_ACBLEN 52 /* length of acb portion of lkb V */ X#define LKB$C_ACBLEN 52 /* length of acb portion of lkb V */ X#define LKB$K_LKIDSIZ 18 X#define LKB$C_LKIDSIZ 18 X#define LKB$K_GRANTED 1 /* granted V */ X#define LKB$K_CONVERT 0 /* conversion V */ X#define LKB$K_WAITING -1 /* waiting V */ X#define LKB$K_RETRY -2 /* retry request V */ X#define LKB$K_SCSWAIT -3 /* scs wait V */ X#define LKB$K_RSPNOTQED -4 /* response not queued V */ X#define LKB$K_RSPQUEUED -5 /* response queued V */ X#define LKB$K_RSPGRANTD -6 /* response granted V */ X#define LKB$K_RSPDOLOCL -7 /* response do locally V */ X#define LKB$K_RSPRESEND -8 /* response resend V */ X#define LKB$K_RSPWAIT -9 /* response wait V */ X#define LKB$K_LENGTH 100 /* length of lkb V */ X#define LKB$C_LENGTH 100 /* length of lkb V */ X#define LKB$S_LKBDEF 100 X `20 X#pragma nostandard Xstruct lkb `7B X unsigned long lkb$l_astqfl; /* ast queue forward link V `20 X*/ X unsigned long lkb$l_astqbl; /* ast queue backward link V `20 X*/ X unsigned short lkb$w_size; /* size of lkb in bytes V `20 X*/ X unsigned char lkb$b_type; /* structure type V `20 X*/ X variant_union `7B V `20 X unsigned char lkb$b_rmod; /* access mode of request V `20 X*/ X variant_struct `7B V `20 X unsigned lkb$v_fill : 4; /* mode subfield V `20 X*/ X unsigned lkb$v_pkast : 1; /* piggy back special kernel ast V `20 X*/ X unsigned lkb$v_nodelete : 1; /* don't delete acb on delivery V `20 X*/ X unsigned lkb$v_quota : 1; /* account for quota V `20 X*/ X unsigned lkb$v_kast : 1; /* special kernel ast V `20 X*/ X `7D lkb$r_mode_bits; V `20 X `7D lkb$r_mode_overlay; V `20 X unsigned long lkb$l_pid; /* process id of requesting proces Vs X*/ X variant_union `7B V `20 X unsigned long lkb$l_ast; /* address of ast routine V `20 X*/ X variant_struct `7B V `20 X unsigned short lkb$w_rqseqnm; /* request seq. number V `20 X*/ X unsigned short lkb$w_fill; V `20 X `7D lkb$r_rqseqnm; V `20 X `7D lkb$r_ast_overlay; V `20 X variant_union `7B V `20 X unsigned long lkb$l_astprm; /* ast parameter V `20 X*/ X unsigned long lkb$l_epid; /* epid (master copies only) V `20 X*/ X `7D lkb$r_astprm_overlay; V `20 X variant_union `7B V `20 X unsigned long lkb$l_kast; /* special kernel ast address V `20 X*/ X unsigned long lkb$l_duetime; /* duetime for waiting locks V `20 X*/ X `7D lkb$r_kast_overlay; V `20 X unsigned long lkb$l_cplastadr; /* address of completion ast Xroutine*/ X unsigned long lkb$l_blkastadr; /* address of blocking ast routine V`20 X*/ X variant_union `7B V `20 X unsigned long lkb$l_lksb; /* address of lock status block V `20 X*/ X unsigned long lkb$l_dlckpri; /* deadlock priority (master Xcopies)*/ X `7D lkb$r_lksb_overlay; V `20 X unsigned short lkb$w_flags; /* user specified flags V `20 X*/ X variant_union `7B V `20 X unsigned short lkb$w_status; /* internal status V `20 X*/ X variant_struct `7B V `20 X unsigned lkb$v_dcplast : 1; /* deliver completion ast V `20 X*/ X unsigned lkb$v_dblkast : 1; /* deliver blocking ast V `20 X*/ X unsigned lkb$v_async : 1; /* request completed Xasynchronously*/ X unsigned lkb$v_blkastqed : 1; /* blocking ast has been queued V `20 X*/ X unsigned lkb$v_mstcpy : 1; /* lkb is a master copy V `20 X*/ X unsigned lkb$v_noquota : 1; /* don't charge quota V `20 X*/ X unsigned lkb$v_timoutq : 1; /* lkb is on timeout queue V `20 X*/ X unsigned lkb$v_wassysown : 1; /* was system owned lock V `20 X*/ X unsigned lkb$v_cvttosys : 1; /* cvt back to sys. owned V `20 X*/ X unsigned lkb$v_protect : 1; /* protected lock V `20 X*/ X unsigned lkb$v_resend : 1; /* resend during failover V `20 X*/ X unsigned lkb$v_rm_rbrqd : 1; /* remaster rebuild required V `20 X*/ X unsigned lkb$v_flock : 1; /* fork lock V `20 X*/ X unsigned lkb$v_ip : 1; /* operation in progress V `20 X*/ X unsigned lkb$v_fill_2 : 2; V `20 X `7D lkb$r_status_bits; V `20 X `7D lkb$r_status_overlay; V `20 X unsigned long lkb$l_lkst1; /* first lock status longword V `20 X*/ X variant_union `7B V `20 X unsigned long lkb$l_lkst2; /* second lock status longword V `20 X*/ X unsigned long lkb$l_lkid; /* lock id V `20 X*/ X `7D lkb$r_lkst1_overlay; V `20 X unsigned char lkb$b_rqmode; /* request mode V `20 X*/ X unsigned char lkb$b_grmode; /* granted mode V `20 X*/ X unsigned char lkb$b_state; /* lock state V `20 X*/ X unsigned char lkb$b_efn; /* event flag number V `20 X*/ X unsigned long lkb$l_sqfl; /* state queue forward link V `20 X*/ X unsigned long lkb$l_sqbl; /* state queue backward link V `20 X*/ X unsigned long lkb$l_ownqfl; /* owner queue forward link V `20 X*/ X unsigned long lkb$l_ownqbl; /* owner queue backward link V `20 X*/ +-+-+-+-+-+-+-+- END OF PART 3 +-+-+-+-+-+-+-+-