--******************************************************************************************************************** -- Created: 30-Mar-2010 17:32:33 by OpenVMS SDL EV3-3 -- Source: 18-NOV-2005 14:19:37 $1$DGA7274:[LIB_ADA.LIS]CBBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package CBBDEF is -- module $CBBDEF CBB_M_OVERRIDE_LOCK : constant := 1; CBB_M_ZERO : constant := 2; CBB_M_DUPLICATE_COPY : constant := 4; --+ -- -- Common bitmask block definition. The purpose of this data structure -- is to represent a variable, potentially unlimited number of CPUs in -- bitmask format. The CBB is intended to be a generic construct as well; -- flexible enough for other applications that require bitmask support. --- CBB_M_LOCK_BIT : constant := 16#00000001#; CBB_M_AUTO_LOCK : constant := 16#00000002#; CBB_M_TIMEOUT_CRASH : constant := 16#00000004#; CBB_M_SUMMARY_BITS : constant := 16#00000008#; CBB_M_SET_COUNT : constant := 16#00000010#; type CBB_STATE_TYPE is -- State bitmask record LOCK_BIT : BOOLEAN; -- Atomic locking bit AUTO_LOCK : BOOLEAN; -- Automatic locking state TIMEOUT_CRASH : BOOLEAN; -- Crash if timeout exceeded SUMMARY_BITS : BOOLEAN; -- Summary masks to be updated SET_COUNT : BOOLEAN; -- Count of bits set kept FILLER_1 : BIT_ARRAY (0 .. 58); end record; for CBB_STATE_TYPE use record LOCK_BIT at 0 range 0 .. 0; AUTO_LOCK at 0 range 1 .. 1; TIMEOUT_CRASH at 0 range 2 .. 2; SUMMARY_BITS at 0 range 3 .. 3; SET_COUNT at 0 range 4 .. 4; FILLER_1 at 0 range 5 .. 63; end record; for CBB_STATE_TYPE'SIZE use 64; CBB_STATE_TYPE_INIT : constant CBB_STATE_TYPE := (LOCK_BIT => FALSE, AUTO_LOCK => FALSE, TIMEOUT_CRASH => FALSE, SUMMARY_BITS => FALSE, SET_COUNT => FALSE, FILLER_1 => (others => FALSE)); type CBB_TYPE is record DATA_OFFSET : UNSIGNED_LONGWORD; -- Offset to start of bit data UNIT_COUNT : UNSIGNED_WORD; -- Valid data units within block UNIT_SIZE : UNSIGNED_BYTE; -- Size of data units in bytes LOCK_IPL : UNSIGNED_BYTE; -- Synchronization IPL for CBB SIZE : UNSIGNED_WORD; -- Structure size TYP : UNSIGNED_BYTE; -- Structure type SUBTYP : UNSIGNED_BYTE; -- Structure subtype BIT_COUNT : UNSIGNED_LONGWORD; -- Number of data bits set in block INTERLOCK : UNSIGNED_QUADWORD; -- Alias for locking ----Component(s) below are defined as comments since they ----overlap other fields ---- ----STATE : CBB_STATE_TYPE; -- State bitmask TIMEOUT_COUNT : UNSIGNED_LONGWORD; -- Timeout interval in 10usec SAVED_IPL : UNSIGNED_LONGWORD; -- Caller's IPL upon entrance to -- Exe$cbb_lock VALID_BITS : UNSIGNED_LONGWORD; -- # of bits (specified by the user -- on input to allocate, get_size, and -- initialize) represented by this Cbb FILLER_1 : UNSIGNED_BYTE_ARRAY (1 .. 4); -- To preserve quadword alignment -- -- All new fields must be added before the SUMMARY_BITMASK field. The SUMMARY_BITMASK -- field below may be the 1st summary bitmask field of many. -- SUMMARY_BITMASK : UNSIGNED_QUADWORD; -- Summary bitmask of 64 unit bitmasks end record; for CBB_TYPE use record DATA_OFFSET at 0 range 0 .. 31; UNIT_COUNT at 4 range 0 .. 15; UNIT_SIZE at 6 range 0 .. 7; LOCK_IPL at 7 range 0 .. 7; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; BIT_COUNT at 12 range 0 .. 31; INTERLOCK at 16 range 0 .. 63; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----STATE at 16 range 0 .. 63; TIMEOUT_COUNT at 24 range 0 .. 31; SAVED_IPL at 28 range 0 .. 31; VALID_BITS at 32 range 0 .. 31; FILLER_1 at 36 range 0 .. 31; SUMMARY_BITMASK at 40 range 0 .. 63; end record; for CBB_TYPE'SIZE use 384; CBB_TYPE_INIT : constant CBB_TYPE := (DATA_OFFSET => 0, UNIT_COUNT => 0, UNIT_SIZE => 0, LOCK_IPL => 0, SIZE => 0, TYP => 0, SUBTYP => 0, BIT_COUNT => 0, INTERLOCK => (0, 0), TIMEOUT_COUNT => 0, SAVED_IPL => 0, VALID_BITS => 0, FILLER_1 => (others => 0), SUMMARY_BITMASK => (0, 0)); CBB_K_LENGTH : constant := 48; -- Length of CBB CBB_C_LENGTH : constant := 48; -- Length of CBB -- Function code values for the function input parameter to the routine, -- Exe$cbb_boolean_oper. -- CBB_C_OR : constant := 0; -- Logical Sum CBB_C_AND : constant := 1; -- Logical Product CBB_C_XOR : constant := 2; -- Logical Difference CBB_C_BIC : constant := 3; -- Logical Product with Complement CBB_C_ORNOT : constant := 4; -- Logical Sum with Complement CBB_C_EQV : constant := 5; -- Logical Equivalence (XORNOT) CBB_C_COMP : constant := 6; -- Logical ones complement of source CBB_C_MAX_FUNCTION : constant := 6; CBB_K_STATIC_CPU_COUNT : constant := 64; CBB_K_STATIC_BLOCK : constant := 64; end CBBDEF;