--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:19 by OpenVMS SDL EV3-3 -- Source: 11-AUG-2005 14:45:38 $1$DGA8085:[LIB_ADA.LIS]CPBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package CPBDEF is -- module $CPBDEF --+ -- -- Constants defining CPU capability numbers and flags for routines -- CPB_C_PRIMARY : constant := 0; -- Primary CPU (aka TIMEKEEPER) CPB_C_NS : constant := 1; -- future CPB_C_QUORUM : constant := 2; -- Cluster quorum required CPB_C_RUN : constant := 3; -- Run capability CPB_C_IMPLICIT_AFFINITY : constant := 4; -- Implicit affinity CPB_C_SOFT_RAD_AFFINITY : constant := 5; -- If set, need to check further for soft RAD affinity CPB_C_RAD_0 : constant := 6; CPB_C_RAD_1 : constant := 7; CPB_C_RAD_2 : constant := 8; CPB_C_RAD_3 : constant := 9; CPB_C_RAD_4 : constant := 10; CPB_C_RAD_5 : constant := 11; CPB_C_RAD_6 : constant := 12; CPB_C_RAD_7 : constant := 13; CPB_C_MAX : constant := 32; CPB_C_MAX_SYSTEM_BITS : constant := 16; CPB_C_MAX_USER_BITS : constant := 16; CPB_C_VECTOR : constant := 1; -- equate NS with VECTOR CPB_M_PRIMARY : constant := 16#00000001#; CPB_M_VECTOR : constant := 16#00000002#; CPB_M_QUORUM : constant := 16#00000004#; CPB_M_RUN : constant := 16#00000008#; CPB_M_IMPLICIT_AFFINITY : constant := 16#00000010#; CPB_M_SOFT_RAD_AFFINITY : constant := 16#00000020#; CPB_M_RAD_0 : constant := 16#00000040#; CPB_M_RAD_1 : constant := 16#00000080#; CPB_M_RAD_2 : constant := 16#00000100#; CPB_M_RAD_3 : constant := 16#00000200#; CPB_M_RAD_4 : constant := 16#00000400#; CPB_M_RAD_5 : constant := 16#00000800#; CPB_M_RAD_6 : constant := 16#00001000#; CPB_M_RAD_7 : constant := 16#00002000#; CPB_M_THDS_IDLE : constant := 16#00004000#; CPB_S_CPBDEF : constant := 4; type CPB_TYPE is record PRIMARY : BOOLEAN; -- Primary (timekeeper) VECTOR : BOOLEAN; -- Vector processor QUORUM : BOOLEAN; -- Cluster quorum required RUN : BOOLEAN; -- CPU can run processes IMPLICIT_AFFINITY : BOOLEAN; -- Extended cap - implicit aff SOFT_RAD_AFFINITY : BOOLEAN; -- Extended cap - Soft RAD affinity RAD_0 : BOOLEAN; -- RAD in which a CPU resides. MUST REMAIN IN ORDER RAD_1 : BOOLEAN; RAD_2 : BOOLEAN; RAD_3 : BOOLEAN; RAD_4 : BOOLEAN; RAD_5 : BOOLEAN; RAD_6 : BOOLEAN; RAD_7 : BOOLEAN; THDS_IDLE : BOOLEAN; -- KTB must be alone on a core. Other CPU thds must be idle. FILLER_1 : UNSIGNED_17; end record; for CPB_TYPE use record PRIMARY at 0 range 0 .. 0; VECTOR at 0 range 1 .. 1; QUORUM at 0 range 2 .. 2; RUN at 0 range 3 .. 3; IMPLICIT_AFFINITY at 0 range 4 .. 4; SOFT_RAD_AFFINITY at 0 range 5 .. 5; RAD_0 at 0 range 6 .. 6; RAD_1 at 0 range 7 .. 7; RAD_2 at 1 range 0 .. 0; RAD_3 at 1 range 1 .. 1; RAD_4 at 1 range 2 .. 2; RAD_5 at 1 range 3 .. 3; RAD_6 at 1 range 4 .. 4; RAD_7 at 1 range 5 .. 5; THDS_IDLE at 1 range 6 .. 6; FILLER_1 at 1 range 7 .. 23; end record; for CPB_TYPE'SIZE use 32; CPB_TYPE_INIT : constant CPB_TYPE := (PRIMARY => FALSE, VECTOR => FALSE, QUORUM => FALSE, RUN => FALSE, IMPLICIT_AFFINITY => FALSE, SOFT_RAD_AFFINITY => FALSE, RAD_0 => FALSE, RAD_1 => FALSE, RAD_2 => FALSE, RAD_3 => FALSE, RAD_4 => FALSE, RAD_5 => FALSE, RAD_6 => FALSE, RAD_7 => FALSE, THDS_IDLE => FALSE, FILLER_1 => 0); type CPB_TYPE is record CPB : CPB_TYPE; end record; for CPB_TYPE use record CPB at 0 range 0 .. 31; end record; for CPB_TYPE'SIZE use 32; CPB_TYPE_INIT : constant CPB_TYPE := ( CPB => CPB_TYPE_INIT ); CPB_M_FLAG_CHECK_CPU : constant := 16#00000001#; CPB_M_FLAG_PERMANENT : constant := 16#00000002#; CPB_M_FLAG_PRIMARY : constant := 16#00000004#; CPB_M_FLAG_CHECK_CPU_ACTIVE : constant := 16#00000008#; CPB_S_CPB_FLAGSDEF : constant := 1; type CPB_FLAGS_TYPE is record FLAG_CHECK_CPU : BOOLEAN; -- Check that process can run FLAG_PERMANENT : BOOLEAN; -- Affect process permanent mask FLAG_PRIMARY : BOOLEAN; -- Request to run on primary cpu FLAG_CHECK_CPU_ACTIVE : BOOLEAN; -- Check all selected CPUs active FLAG_FILLER : UNSIGNED_4; -- *** ADD ALL NEW BITFIELDS BEFORE THIS DECLARATION -- *** THIS FIELD IS USED TO ASSURE MASKS ARE WITHIN RANGE end record; for CPB_FLAGS_TYPE use record FLAG_CHECK_CPU at 0 range 0 .. 0; FLAG_PERMANENT at 0 range 1 .. 1; FLAG_PRIMARY at 0 range 2 .. 2; FLAG_CHECK_CPU_ACTIVE at 0 range 3 .. 3; FLAG_FILLER at 0 range 4 .. 7; end record; for CPB_FLAGS_TYPE'SIZE use 8; CPB_FLAGS_TYPE_INIT : constant CPB_FLAGS_TYPE := (FLAG_CHECK_CPU => FALSE, FLAG_PERMANENT => FALSE, FLAG_PRIMARY => FALSE, FLAG_CHECK_CPU_ACTIVE => FALSE, FLAG_FILLER => 0); type CPB_FLAGS_TYPE is record CPB_FLAGS : CPB_FLAGS_TYPE; end record; for CPB_FLAGS_TYPE use record CPB_FLAGS at 0 range 0 .. 7; end record; for CPB_FLAGS_TYPE'SIZE use 8; CPB_FLAGS_TYPE_INIT : constant CPB_FLAGS_TYPE := ( CPB_FLAGS => CPB_FLAGS_TYPE_INIT); end CPBDEF;