--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:37 by OpenVMS SDL EV3-3 -- Source: 28-JUL-2005 10:19:37 $1$DGA8085:[LIB_ADA.LIS]WCBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package WCBDEF is -- module $WCBDEF --+ -- WCB - WINDOW CONTROL BLOCK -- -- THERE IS A WINDOW CONTROL BLOCK FOR EACH FILE ACCESSED BY A PROCESS. -- IT CONTAINS MAPPING INFORMATION SUCH THAT A LARGE PERCENTAGE OF VIRTUAL -- FILE I/O CAN BE MAPPED FROM VIRTUAL TO LOGICAL BLOCK NUMBERS WITHOUT -- HAVING TO READ THE RESPECTIVE FILE HEADER. --- WCB_M_READ : constant := 16#00000001#; WCB_M_WRITE : constant := 16#00000002#; WCB_M_NOTFCP : constant := 16#00000004#; WCB_M_SHRWCB : constant := 16#00000008#; WCB_M_OVERDRAWN : constant := 16#00000010#; WCB_M_COMPLETE : constant := 16#00000020#; WCB_M_CATHEDRAL : constant := 16#00000040#; WCB_M_EXPIRE : constant := 16#00000080#; WCB_M_CONTROL : constant := 16#00001000#; WCB_M_NO_READ_DATA : constant := 16#00002000#; WCB_K_MAP : constant := 80; -- MAP POINTERS START HERE WCB_C_MAP : constant := 80; -- MAP POINTERS START HERE WCB_K_LENGTH : constant := 80; -- LENGTH OF STANDARD WCB SANS POINTERS WCB_C_LENGTH : constant := 80; -- LENGTH OF STANDARD WCB SANS POINTERS -- NOTE THAT VIRTUAL MAPPING WCB_S_WCBDEF : constant := 104; -- Old size name - synonym type WCB_ACCES_TYPE is -- ACCESS CONTROL BYTE record READ : BOOLEAN; -- READ ACCESS ALLOWED (1=YES) WRITE : BOOLEAN; -- WRITE ACCESS ALLOWED (1=YES) NOTFCP : BOOLEAN; -- FILE NOT ACCESSED BY FCP IF SET SHRWCB : BOOLEAN; -- SHARED WINDOW OVERDRAWN : BOOLEAN; -- FILE ACCESSOR HAS OVERDRAWN HIS QUOTA COMPLETE : BOOLEAN; -- SET WINDOW MAPS ENTIRE FILE CATHEDRAL : BOOLEAN; -- LARGE, COMPLEX WINDOW (SIC) TO MAP -- FILE COMPLETELY EXPIRE : BOOLEAN; -- FILE EXPIRATION DATE MAY NEED TO BE SET end record; for WCB_ACCES_TYPE use record READ at 0 range 0 .. 0; WRITE at 0 range 1 .. 1; NOTFCP at 0 range 2 .. 2; SHRWCB at 0 range 3 .. 3; OVERDRAWN at 0 range 4 .. 4; COMPLETE at 0 range 5 .. 5; CATHEDRAL at 0 range 6 .. 6; EXPIRE at 0 range 7 .. 7; end record; for WCB_ACCES_TYPE'SIZE use 8; WCB_ACCES_TYPE_INIT : constant WCB_ACCES_TYPE := (READ => FALSE, WRITE => FALSE, NOTFCP => FALSE, SHRWCB => FALSE, OVERDRAWN => FALSE, COMPLETE => FALSE, CATHEDRAL => FALSE, EXPIRE => FALSE); type WCB_ACON_BITS1_TYPE is record FILLER_1 : UNSIGNED_2; -- THE FOLLOWING FIELDS OVERLAY THE FIRST -- UNUSED FLAG IN WCB$W_ACON ABOVE (FILL_1). NOACCLOCK : BOOLEAN; -- NO ACCESS LOCK CHECKING SSIO : BOOLEAN; -- File is open for SSIO access. FILLER_2 : UNSIGNED_10; READINIT : BOOLEAN; -- A READINIT WAS DONE OVER THIS CHANNEL WRITE_TURN : BOOLEAN; -- FORCE WINDOW TURN ON WRITES end record; for WCB_ACON_BITS1_TYPE use record FILLER_1 at 0 range 0 .. 1; NOACCLOCK at 0 range 2 .. 2; SSIO at 0 range 3 .. 3; FILLER_2 at 0 range 4 .. 13; READINIT at 1 range 6 .. 6; WRITE_TURN at 1 range 7 .. 7; end record; for WCB_ACON_BITS1_TYPE'SIZE use 16; WCB_ACON_BITS1_TYPE_INIT : constant WCB_ACON_BITS1_TYPE := (FILLER_1 => 0, NOACCLOCK => FALSE, SSIO => FALSE, FILLER_2 => 0, READINIT => FALSE, WRITE_TURN => FALSE); type WCB_ACON_TYPE is -- ACCESS CONTROL INFORMATION record NOWRITE : BOOLEAN; -- NO OTHER WRITERS DLOCK : BOOLEAN; -- ENABLE DEACCESS LOCK FILLER_1 : UNSIGNED_2; -- UNUSED SPOOL : BOOLEAN; -- SPOOL FILE ON CLOSE WRITECK : BOOLEAN; -- ENABLE WRITE CHECK SEQONLY : BOOLEAN; -- SEQUENTIAL ONLY ACCESS SNAPSHOT : BOOLEAN; -- SNAPSHOT REVALIDATION PENDING WRITEAC : BOOLEAN; -- WRITE ACCESS READCK : BOOLEAN; -- ENABLE READ CHECK NOREAD : BOOLEAN; -- NO OTHER READERS NOTRUNC : BOOLEAN; -- NO TRUNCATES CONTROL : BOOLEAN; -- CONTROL ACCESS TO FILE NO_READ_DATA : BOOLEAN; -- NO READ ACCESS TO FILE DATA FILLER_2 : UNSIGNED_18; -- ALIGNMENT WITH ACON_BITS1 below ----Component(s) below are defined as comments since they ----overlap other fields ---- ----ACON_BITS1 : WCB_ACON_BITS1_TYPE; end record; for WCB_ACON_TYPE use record NOWRITE at 0 range 0 .. 0; DLOCK at 0 range 1 .. 1; FILLER_1 at 0 range 2 .. 3; SPOOL at 0 range 4 .. 4; WRITECK at 0 range 5 .. 5; SEQONLY at 0 range 6 .. 6; SNAPSHOT at 0 range 7 .. 7; WRITEAC at 1 range 0 .. 0; READCK at 1 range 1 .. 1; NOREAD at 1 range 2 .. 2; NOTRUNC at 1 range 3 .. 3; CONTROL at 1 range 4 .. 4; NO_READ_DATA at 1 range 5 .. 5; FILLER_2 at 1 range 6 .. 23; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----ACON_BITS1 at 0 range 0 .. 15; end record; for WCB_ACON_TYPE'SIZE use 32; WCB_ACON_TYPE_INIT : constant WCB_ACON_TYPE := (NOWRITE => FALSE, DLOCK => FALSE, FILLER_1 => 0, SPOOL => FALSE, WRITECK => FALSE, SEQONLY => FALSE, SNAPSHOT => FALSE, WRITEAC => FALSE, READCK => FALSE, NOREAD => FALSE, NOTRUNC => FALSE, CONTROL => FALSE, NO_READ_DATA => FALSE, FILLER_2 => 0); type WCB_P1_FIELDS_TYPE is record P1_COUNT : UNSIGNED_LONGWORD; -- COUNT FIELD OF FIRST POINTER P1_LBN : UNSIGNED_LONGWORD; -- LBN FIELD OF SECOND POINTER P1_RVN : UNSIGNED_LONGWORD; -- RVN OF FIRST POINTER end record; for WCB_P1_FIELDS_TYPE use record P1_COUNT at 0 range 0 .. 31; P1_LBN at 4 range 0 .. 31; P1_RVN at 8 range 0 .. 31; end record; for WCB_P1_FIELDS_TYPE'SIZE use 96; WCB_P1_FIELDS_TYPE_INIT : constant WCB_P1_FIELDS_TYPE := (P1_COUNT => 0, P1_LBN => 0, P1_RVN => 0); type WCB_DELQ_FIELDS_TYPE is record DELIQ : UNSIGNED_QUADWORD; -- DELETE PENDIONG QUEUE FILLER_1 : UNSIGNED_BYTE_ARRAY (1 .. 4); end record; for WCB_DELQ_FIELDS_TYPE use record DELIQ at 0 range 0 .. 63; FILLER_1 at 8 range 0 .. 31; end record; for WCB_DELQ_FIELDS_TYPE'SIZE use 96; WCB_DELQ_FIELDS_TYPE_INIT : constant WCB_DELQ_FIELDS_TYPE := (DELIQ => (0, 0), FILLER_1 => (others => 0)); type WCB_P1_OVERLAY_TYPE is record P1_COUNT : UNSIGNED_WORD; -- TMP FILLER_1 : UNSIGNED_BYTE_ARRAY (1 .. 10); -- PADDING ----Component(s) below are defined as comments since they ----overlap other fields ---- ----P1_FIELDS : WCB_P1_FIELDS_TYPE; ----DELQ_FIELDS : WCB_DELQ_FIELDS_TYPE; end record; for WCB_P1_OVERLAY_TYPE use record P1_COUNT at 0 range 0 .. 15; FILLER_1 at 2 range 0 .. 79; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----P1_FIELDS at 0 range 0 .. 95; ----DELQ_FIELDS at 0 range 0 .. 95; end record; for WCB_P1_OVERLAY_TYPE'SIZE use 96; WCB_P1_OVERLAY_TYPE_INIT : constant WCB_P1_OVERLAY_TYPE := (P1_COUNT => 0, FILLER_1 => (others => 0)); type WCB_TYPE is record WLFL : ADDRESS; -- WINDOW LIST FORWARD LINK WLBL : ADDRESS; -- WINDOW LIST BACKWARD LINK SIZE : UNSIGNED_WORD; -- SIZE OF WINDOW BLOCK IN BYTES TYP : UNSIGNED_BYTE; -- STRUCTURE TYPE OF WCB ACCES : WCB_ACCES_TYPE; -- ACCESS CONTROL BYTE PID : UNSIGNED_LONGWORD; -- PROCESS ID OF ACCESSOR PROCESS REFCNT : UNSIGNED_LONGWORD; -- REFERENCE COUNT FOR SHARED WINDOW ORGUCB : ADDRESS; -- ADDRESS OF ORIGINAL UCB FROM CCB ACON : WCB_ACON_TYPE; -- ACCESS CONTROL INFORMATION SSIO_SC : ADDRESS; -- Pointer to SSIO Stream Context (if SSIO access) NMAP : UNSIGNED_LONGWORD; -- NUMBER OF MAPPING POINTERS FCB : ADDRESS; -- ADDRESS OF FCB RVT : ADDRESS; -- ADDRESS OF RELATIVE VOLUME TABLE LINK : ADDRESS; -- LINK TO NEXT WINDOW SEGMENT OPENTIME : UNSIGNED_QUADWORD; -- Creation time of WCB READS : UNSIGNED_LONGWORD; -- Count of read I/Os WRITES : UNSIGNED_LONGWORD; -- Count of write I/Os SPLIT_IO : UNSIGNED_LONGWORD; -- Count of split I/Os ASSIST_IO : UNSIGNED_LONGWORD; -- Count of file system assisted I/Os FILLER_1 : UNSIGNED_LONGWORD; -- Longword pad and spare space STVBN : UNSIGNED_LONGWORD; -- STARTING VBN MAPPED BY WINDOW -- NEEDS P1_COUNT IMMEDIATELY -- FOLLOWING STVBN P1_OVERLAY : WCB_P1_OVERLAY_TYPE; P2_COUNT : UNSIGNED_LONGWORD; -- COUNT FIELD OF SECOND POINTER P2_LBN : UNSIGNED_LONGWORD; -- LBN FIELD OF FIRST POINTER P2_RVN : UNSIGNED_LONGWORD; -- RVN OF SECOND POINTER -- FORMAT OF RETRIEVAL POINTER end record; for WCB_TYPE use record WLFL at 0 range 0 .. 31; WLBL at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; ACCES at 11 range 0 .. 7; PID at 12 range 0 .. 31; REFCNT at 16 range 0 .. 31; ORGUCB at 20 range 0 .. 31; ACON at 24 range 0 .. 31; SSIO_SC at 28 range 0 .. 31; NMAP at 32 range 0 .. 31; FCB at 36 range 0 .. 31; RVT at 40 range 0 .. 31; LINK at 44 range 0 .. 31; OPENTIME at 48 range 0 .. 63; READS at 56 range 0 .. 31; WRITES at 60 range 0 .. 31; SPLIT_IO at 64 range 0 .. 31; ASSIST_IO at 68 range 0 .. 31; FILLER_1 at 72 range 0 .. 31; STVBN at 76 range 0 .. 31; P1_OVERLAY at 80 range 0 .. 95; P2_COUNT at 92 range 0 .. 31; P2_LBN at 96 range 0 .. 31; P2_RVN at 100 range 0 .. 31; end record; for WCB_TYPE'SIZE use 832; WCB_TYPE_INIT : constant WCB_TYPE := (WLFL => ADDRESS_ZERO, WLBL => ADDRESS_ZERO, SIZE => 0, TYP => 0, ACCES => WCB_ACCES_TYPE_INIT, PID => 0, REFCNT => 0, ORGUCB => ADDRESS_ZERO, ACON => WCB_ACON_TYPE_INIT, SSIO_SC => ADDRESS_ZERO, NMAP => 0, FCB => ADDRESS_ZERO, RVT => ADDRESS_ZERO, LINK => ADDRESS_ZERO, OPENTIME => (0, 0), READS => 0, WRITES => 0, SPLIT_IO => 0, ASSIST_IO => 0, FILLER_1 => 0, STVBN => 0, P1_OVERLAY => WCB_P1_OVERLAY_TYPE_INIT, P2_COUNT => 0, P2_LBN => 0, P2_RVN => 0); WCB_K_MAP_PTR_LENGTH : constant := 12; WCB_C_MAP_PTR_LENGTH : constant := 12; WCB_S_WCBDEF1 : constant := 12; -- Old size name - synonym type WCB1_TYPE is record COUNT : UNSIGNED_LONGWORD; -- COUNT FIELD LBN : UNSIGNED_LONGWORD; -- LBN FIELD RVN : UNSIGNED_LONGWORD; -- RVN FIELD end record; for WCB1_TYPE use record COUNT at 0 range 0 .. 31; LBN at 4 range 0 .. 31; RVN at 8 range 0 .. 31; end record; for WCB1_TYPE'SIZE use 96; WCB1_TYPE_INIT : constant WCB1_TYPE := (COUNT => 0, LBN => 0, RVN => 0); WCB_S_WCBDEF2 : constant := 13; -- Old size name - synonym type WCB2_TYPE is record PREVCOUNT : UNSIGNED_LONGWORD; -- PREVIOUS RETRIEVAL POINTER PREVLBN : UNSIGNED_LONGWORD; PREVRVN : UNSIGNED_LONGWORD; -- RETRIEVAL POINTER FORMAT FILLER_1 : UNSIGNED_BYTE; end record; for WCB2_TYPE use record PREVCOUNT at 0 range 0 .. 31; PREVLBN at 4 range 0 .. 31; PREVRVN at 8 range 0 .. 31; FILLER_1 at 12 range 0 .. 7; end record; for WCB2_TYPE'SIZE use 104; WCB2_TYPE_INIT : constant WCB2_TYPE := (PREVCOUNT => 0, PREVLBN => 0, PREVRVN => 0, FILLER_1 => 0); end WCBDEF;