-- --**************************************************************************** --* * --* Copyright (c) 2001 * --* by DIGITAL Equipment Corporation, Maynard, Mass. * --* * --* 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 which is not supplied by DIGITAL. * --* * --**************************************************************************** --******************************************************************************************************************** -- Created: 15-MAR-2001 22:54:27 by OpenVMS SDL EV1-33 -- Source: 27-FEB-1992 10:48:29 $11$DUA933:[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 := 48; -- MAP POINTERS START HERE WCB_C_MAP : constant := 48; -- MAP POINTERS START HERE WCB_K_LENGTH : constant := 48; -- LENGTH OF STANDARD WCB SANS POINTERS WCB_C_LENGTH : constant := 48; -- LENGTH OF STANDARD WCB SANS POINTERS -- NOTE THAT VIRTUAL MAPPING 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_PID_TYPE is -- PROCESS ID OF ACCESSOR PROCESS record FILLER_1 : UNSIGNED_BYTE_ARRAY (1 .. 2); REFCNT : UNSIGNED_WORD; -- REFERENCE COUNT FOR SHARED WINDOW end record; for WCB_PID_TYPE use record FILLER_1 at 0 range 0 .. 15; REFCNT at 2 range 0 .. 15; end record; for WCB_PID_TYPE'SIZE use 32; WCB_PID_TYPE_INIT : constant WCB_PID_TYPE := (FILLER_1 => (others => 0), REFCNT => 0); type WCB_ACON_BITS1_TYPE is record FILLER_1 : UNSIGNED_2; -- THE FOLLOWING FIELD OVERLAYS THE FIRST -- UNUSED FLAG IN WCB$W_ACON ABOVE. NOACCLOCK : BOOLEAN; -- NO ACCESS LOCK CHECKING FILLER_2 : UNSIGNED_11; 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; FILLER_2 at 0 range 3 .. 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, 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_2; -- 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 .. 7; ----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 16; 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_TYPE is record WLFL : UNSIGNED_LONGWORD; -- WINDOW LIST FORWARD LINK WLBL : UNSIGNED_LONGWORD; -- 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 : WCB_PID_TYPE; -- PROCESS ID OF ACCESSOR PROCESS ORGUCB : UNSIGNED_LONGWORD; -- ADDRESS OF ORIGINAL UCB FROM CCB ACON : WCB_ACON_TYPE; -- ACCESS CONTROL INFORMATION -- SIZE DEVICE INDEPENDENT PART OF WCB NMAP : UNSIGNED_WORD; -- NUMBER OF MAPPING POINTERS FCB : UNSIGNED_LONGWORD; -- ADDRESS OF FCB RVT : UNSIGNED_LONGWORD; -- ADDRESS OF RELATIVE VOLUME TABLE LINK : UNSIGNED_LONGWORD; -- LINK TO NEXT WINDOW SEGMENT READS : UNSIGNED_LONGWORD; -- COUNT OF READS PERFORMED WRITES : UNSIGNED_LONGWORD; -- COUNT OF WRITES PERFORMED STVBN : UNSIGNED_LONGWORD; -- STARTING VBN MAPPED BY WINDOW -- NEEDS P1_COUNT IMMEDIATELY -- FOLLOWING STVBN P1_COUNT : UNSIGNED_LONGWORD; -- COUNT FIELD OF FIRST POINTER P1_LBN : UNSIGNED_LONGWORD; -- LBN FIELD OF FIRST POINTER P1_RVN : UNSIGNED_BYTE; -- RVN FIELD OF FIRST POINTER FILLER_1 : UNSIGNED_24; -- ALIGN TO NEXT LONGWORD P2_COUNT : UNSIGNED_LONGWORD; -- COUNT FIELD OF SECOND POINTER P2_LBN : UNSIGNED_LONGWORD; -- LBN FIELD OF SECOND POINTER P2_RVN : UNSIGNED_BYTE; -- RVN FIELD OF SECOND POINTER FILLER_2 : UNSIGNED_24; -- ALIGN TO NEXT LONGWORD -- 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; ORGUCB at 16 range 0 .. 31; ACON at 20 range 0 .. 15; NMAP at 22 range 0 .. 15; FCB at 24 range 0 .. 31; RVT at 28 range 0 .. 31; LINK at 32 range 0 .. 31; READS at 36 range 0 .. 31; WRITES at 40 range 0 .. 31; STVBN at 44 range 0 .. 31; P1_COUNT at 48 range 0 .. 31; P1_LBN at 52 range 0 .. 31; P1_RVN at 56 range 0 .. 7; FILLER_1 at 57 range 0 .. 23; P2_COUNT at 60 range 0 .. 31; P2_LBN at 64 range 0 .. 31; P2_RVN at 68 range 0 .. 7; FILLER_2 at 69 range 0 .. 23; end record; for WCB_TYPE'SIZE use 576; WCB_TYPE_INIT : constant WCB_TYPE := (WLFL => 0, WLBL => 0, SIZE => 0, TYP => 0, ACCES => WCB_ACCES_TYPE_INIT, PID => WCB_PID_TYPE_INIT, ORGUCB => 0, ACON => WCB_ACON_TYPE_INIT, NMAP => 0, FCB => 0, RVT => 0, LINK => 0, READS => 0, WRITES => 0, STVBN => 0, P1_COUNT => 0, P1_LBN => 0, P1_RVN => 0, FILLER_1 => 0, P2_COUNT => 0, P2_LBN => 0, P2_RVN => 0, FILLER_2 => 0); WCB_K_MAP_PTR_LENGTH : constant := 12; WCB_C_MAP_PTR_LENGTH : constant := 12; type WCBDEF1_TYPE is record COUNT : UNSIGNED_LONGWORD; -- COUNT FIELD LBN : UNSIGNED_LONGWORD; -- LBN FIELD RVN : UNSIGNED_BYTE; -- RVN FIELD FILLER_1 : UNSIGNED_24; -- ALIGN TO NEXT LONGWORD end record; for WCBDEF1_TYPE use record COUNT at 0 range 0 .. 31; LBN at 4 range 0 .. 31; RVN at 8 range 0 .. 7; FILLER_1 at 9 range 0 .. 23; end record; for WCBDEF1_TYPE'SIZE use 96; WCBDEF1_TYPE_INIT : constant WCBDEF1_TYPE := (COUNT => 0, LBN => 0, RVN => 0, FILLER_1 => 0); type WCBDEF2_TYPE is record PREVCOUNT : UNSIGNED_LONGWORD; -- PREVIOUS RETRIEVAL POINTER COUNT PREVLBN : UNSIGNED_LONGWORD; -- PREVIOUS RETRIEVAL POINTER LBN PREVRVN : UNSIGNED_BYTE; -- PREVIOUS RETRIEVAL POINTER RVN FILLER_1 : UNSIGNED_24; FILLER_2 : UNSIGNED_BYTE; end record; for WCBDEF2_TYPE use record PREVCOUNT at 0 range 0 .. 31; PREVLBN at 4 range 0 .. 31; PREVRVN at 8 range 0 .. 7; FILLER_1 at 9 range 0 .. 23; FILLER_2 at 12 range 0 .. 7; end record; for WCBDEF2_TYPE'SIZE use 104; WCBDEF2_TYPE_INIT : constant WCBDEF2_TYPE := (PREVCOUNT => 0, PREVLBN => 0, PREVRVN => 0, FILLER_1 => 0, FILLER_2 => 0); end WCBDEF;