--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:15 by OpenVMS SDL EV3-3 -- Source: 14-JUN-2005 15:52:49 $1$DGA8085:[LIB_ADA.LIS]ACBDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package ACBDEF is -- module $ACBDEF --+ -- AST CONTROL BLOCK DEFINITIONS -- -- AST CONTROL BLOCKS EXIST AS SEPARATE STRUCTURES AND AS SUBSTRUCTURES -- WITHIN LARGER CONTROL BLOCKS SUCH AS I/O REQUEST PACKETS AND TIMER -- QUEUE ENTRIES. -- --- ACB_M_FLAGS_VALID : constant := 16#00000004#; ACB_M_POSIX_ACB : constant := 16#00000008#; ACB_M_PKAST : constant := 16#00000010#; ACB_M_NODELETE : constant := 16#00000020#; ACB_M_QUOTA : constant := 16#00000040#; ACB_M_KAST : constant := 16#00000080#; ACB_M_THREAD_SAFE : constant := 16#00000001#; ACB_M_THREAD_PID_VALID : constant := 16#00000002#; ACB_M_UPCALL : constant := 16#00000004#; ACB_M_FASTIO : constant := 16#00000008#; ACB_M_64BITS : constant := 16#00000010#; ACB_M_NOFLOAT : constant := 16#00000020#; ACB_M_KAST_NOFLOAT : constant := 16#00000040#; ACB_M_USER_THREAD_ID_VALID : constant := 16#00000080#; ACB_M_EXCLUSIVE : constant := 16#00000100#; ACB_M_TOLERANT : constant := 16#00000200#; ACB_M_NODUP : constant := 16#00000400#; ACB_M_FIRST_IN_QUEUE : constant := 16#00000800#; type ACB_RMOD_TYPE is -- REQUEST ACCESS MODE record MODE : UNSIGNED_2; -- MODE FOR FINAL DELIVERY FLAGS_VALID : BOOLEAN; -- FLAGS IN FLAG_ID ARE VALID POSIX_ACB : BOOLEAN; -- USED FOR DELIVERING SIGNALS/EVENTS PKAST : BOOLEAN; -- PIGGY BACK SPECIAL KERNEL AST NODELETE : BOOLEAN; -- DON'T DELETE ACB ON DELIVERY QUOTA : BOOLEAN; -- ACCOUNT FOR QUOTA KAST : BOOLEAN; -- SPECIAL KERNEL AST end record; for ACB_RMOD_TYPE use record MODE at 0 range 0 .. 1; FLAGS_VALID at 0 range 2 .. 2; POSIX_ACB at 0 range 3 .. 3; PKAST at 0 range 4 .. 4; NODELETE at 0 range 5 .. 5; QUOTA at 0 range 6 .. 6; KAST at 0 range 7 .. 7; end record; for ACB_RMOD_TYPE'SIZE use 8; ACB_RMOD_TYPE_INIT : constant ACB_RMOD_TYPE := (MODE => 0, FLAGS_VALID => FALSE, POSIX_ACB => FALSE, PKAST => FALSE, NODELETE => FALSE, QUOTA => FALSE, KAST => FALSE); type ACB_FLAGS_TYPE is -- AST CONTROL FLAGS record THREAD_SAFE : BOOLEAN; -- AST DOES NOT REQUIRE SYNCHRONIZATION THREAD_PID_VALID : BOOLEAN; -- THREAD_PID FIELD CONTAINS A VALID THREAD PID UPCALL : BOOLEAN; -- THIS AST IS ALREADY AN UPCALL FASTIO : BOOLEAN; -- This ACB is really a Fast-IO IRP ACB_64BITS : BOOLEAN; -- This ACB has a 64-bit AST and ASTPRM NOFLOAT : BOOLEAN; -- The AST routine will not use FP registers KAST_NOFLOAT : BOOLEAN; -- The special kernel AST routine will not use FP registers USER_THREAD_ID_VALID : BOOLEAN; -- USER_THREAD_ID field contains a valid identifier -- Only valid in conjunction with '64BITS' EXCLUSIVE : BOOLEAN; -- AST REQUIRES EXCLUSIVE ACCESS TO INNER MODE TOLERANT : BOOLEAN; -- THREAD SAFE AST WHICH BLOCKS EXCLUSIVE ACCESS TO INNER MODE NODUP : BOOLEAN; -- Do not queue the ACB if ASTADR/ASTPRM match ACB at the tail FIRST_IN_QUEUE : BOOLEAN; -- Should be queued first. Don't put (e.g.) stalled ACBs in front. FILLER_1 : UNSIGNED_20; end record; for ACB_FLAGS_TYPE use record THREAD_SAFE at 0 range 0 .. 0; THREAD_PID_VALID at 0 range 1 .. 1; UPCALL at 0 range 2 .. 2; FASTIO at 0 range 3 .. 3; ACB_64BITS at 0 range 4 .. 4; NOFLOAT at 0 range 5 .. 5; KAST_NOFLOAT at 0 range 6 .. 6; USER_THREAD_ID_VALID at 0 range 7 .. 7; EXCLUSIVE at 1 range 0 .. 0; TOLERANT at 1 range 1 .. 1; NODUP at 1 range 2 .. 2; FIRST_IN_QUEUE at 1 range 3 .. 3; FILLER_1 at 1 range 4 .. 23; end record; for ACB_FLAGS_TYPE'SIZE use 32; ACB_FLAGS_TYPE_INIT : constant ACB_FLAGS_TYPE := (THREAD_SAFE => FALSE, THREAD_PID_VALID => FALSE, UPCALL => FALSE, FASTIO => FALSE, ACB_64BITS => FALSE, NOFLOAT => FALSE, KAST_NOFLOAT => FALSE, USER_THREAD_ID_VALID => FALSE, EXCLUSIVE => FALSE, TOLERANT => FALSE, NODUP => FALSE, FIRST_IN_QUEUE => FALSE, FILLER_1 => 0); type ACB_TYPE is record ASTQFL : ADDRESS; -- AST QUEUE FORWARD LINK ASTQBL : ADDRESS; -- AST QUEUE BACKWARD LINK SIZE : UNSIGNED_WORD; -- STRUCTURE SIZE IN BYTES TYP : UNSIGNED_BYTE; -- STRUCTURE TYPE CODE RMOD : ACB_RMOD_TYPE; -- REQUEST ACCESS MODE PID : UNSIGNED_LONGWORD; -- PROCESS ID OF REQUEST AST : ADDRESS; -- AST ROUTINE ADDRESS ----Component(s) below are defined as comments since they ----overlap other fields ---- ----ACB64X : UNSIGNED_LONGWORD; -- OFFSET TO ACB64X STRUCTURE ASTPRM : UNSIGNED_LONGWORD; -- AST PARAMETER FLAGS : ACB_FLAGS_TYPE; -- AST CONTROL FLAGS THREAD_PID : UNSIGNED_LONGWORD; -- PID of actual target KTB KAST : ADDRESS; -- INTERNAL KERNEL MODE XFER ADDRESS end record; for ACB_TYPE use record ASTQFL at 0 range 0 .. 31; ASTQBL at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; RMOD at 11 range 0 .. 7; PID at 12 range 0 .. 31; AST at 16 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----ACB64X at 16 range 0 .. 31; ASTPRM at 20 range 0 .. 31; FLAGS at 24 range 0 .. 31; THREAD_PID at 28 range 0 .. 31; KAST at 32 range 0 .. 31; end record; for ACB_TYPE'SIZE use 288; ACB_TYPE_INIT : constant ACB_TYPE := (ASTQFL => ADDRESS_ZERO, ASTQBL => ADDRESS_ZERO, SIZE => 0, TYP => 0, RMOD => ACB_RMOD_TYPE_INIT, PID => 0, AST => ADDRESS_ZERO, ASTPRM => 0, FLAGS => ACB_FLAGS_TYPE_INIT, THREAD_PID => 0, KAST => ADDRESS_ZERO); ACB_K_LENGTH : constant := 36; -- Length of block. ACB_C_LENGTH : constant := 36; -- Length of block. ACB_S_ACBDEF : constant := 36; -- Old size name, synonym for ACB$S_ACB type ACB64X_TYPE is record AST : UNSIGNED_QUADWORD; -- 64-BIT AST ROUTINE ADDRESS ASTPRM : UNSIGNED_QUADWORD; -- 64-BIT AST PARAMETER USER_THREAD_ID : UNSIGNED_QUADWORD; -- Unique user thread identifier end record; for ACB64X_TYPE use record AST at 0 range 0 .. 63; ASTPRM at 8 range 0 .. 63; USER_THREAD_ID at 16 range 0 .. 63; end record; for ACB64X_TYPE'SIZE use 192; ACB64X_TYPE_INIT : constant ACB64X_TYPE := (AST => (0, 0), ASTPRM => (0, 0), USER_THREAD_ID => (0, 0)); ACB64X_K_LENGTH : constant := 24; -- Length of block. ACB64X_C_LENGTH : constant := 24; -- Length of block. ACB64_M_FLAGS_VALID : constant := 16#00000004#; ACB64_M_POSIX_ACB : constant := 16#00000008#; ACB64_M_PKAST : constant := 16#00000010#; ACB64_M_NODELETE : constant := 16#00000020#; ACB64_M_QUOTA : constant := 16#00000040#; ACB64_M_KAST : constant := 16#00000080#; ACB64_M_THREAD_SAFE : constant := 16#00000001#; ACB64_M_THREAD_PID_VALID : constant := 16#00000002#; ACB64_M_UPCALL : constant := 16#00000004#; ACB64_M_FASTIO : constant := 16#00000008#; ACB64_M_64BITS : constant := 16#00000010#; ACB64_M_NOFLOAT : constant := 16#00000020#; ACB64_M_KAST_NOFLOAT : constant := 16#00000040#; ACB64_M_USER_THREAD_ID_VALID : constant := 16#00000080#; ACB64_M_EXCLUSIVE : constant := 16#00000100#; ACB64_M_TOLERANT : constant := 16#00000200#; type ACB64_RMOD_TYPE is -- REQUEST ACCESS MODE record MODE : UNSIGNED_2; -- MODE FOR FINAL DELIVERY FLAGS_VALID : BOOLEAN; -- FLAGS IN FLAG_ID ARE VALID (always set in ACB64) POSIX_ACB : BOOLEAN; -- USED FOR DELIVERING SIGNALS/EVENTS PKAST : BOOLEAN; -- PIGGY BACK SPECIAL KERNEL AST NODELETE : BOOLEAN; -- DON'T DELETE ACB ON DELIVERY QUOTA : BOOLEAN; -- ACCOUNT FOR QUOTA KAST : BOOLEAN; -- SPECIAL KERNEL AST end record; for ACB64_RMOD_TYPE use record MODE at 0 range 0 .. 1; FLAGS_VALID at 0 range 2 .. 2; POSIX_ACB at 0 range 3 .. 3; PKAST at 0 range 4 .. 4; NODELETE at 0 range 5 .. 5; QUOTA at 0 range 6 .. 6; KAST at 0 range 7 .. 7; end record; for ACB64_RMOD_TYPE'SIZE use 8; ACB64_RMOD_TYPE_INIT : constant ACB64_RMOD_TYPE := (MODE => 0, FLAGS_VALID => FALSE, POSIX_ACB => FALSE, PKAST => FALSE, NODELETE => FALSE, QUOTA => FALSE, KAST => FALSE); type ACB64_FLAGS_TYPE is -- AST CONTROL FLAGS record THREAD_SAFE : BOOLEAN; -- AST DOES NOT REQUIRE SYNCHRONIZATION THREAD_PID_VALID : BOOLEAN; -- THREAD_PID FIELD CONTAINS A VALID THREAD PID UPCALL : BOOLEAN; -- THIS AST IS ALREADY AN UPCALL FASTIO : BOOLEAN; -- This ACB is really a Fast-IO IRP ACB64_64BITS : BOOLEAN; -- This ACB has a 64-bit AST and ASTPRM (always set in ACB64) NOFLOAT : BOOLEAN; -- The AST routine will not use FP registers KAST_NOFLOAT : BOOLEAN; -- The special kernel AST routine will not use FP registers USER_THREAD_ID_VALID : BOOLEAN; -- USER_THREAD_ID field contains a valid identifier EXCLUSIVE : BOOLEAN; -- AST REQUIRES EXCLUSIVE ACCESS TO INNER MODE TOLERANT : BOOLEAN; -- THREAD SAFE AST WHICH BLOCKS EXCLUSIVE ACCESS TO INNER MODE FILLER_1 : UNSIGNED_22; end record; for ACB64_FLAGS_TYPE use record THREAD_SAFE at 0 range 0 .. 0; THREAD_PID_VALID at 0 range 1 .. 1; UPCALL at 0 range 2 .. 2; FASTIO at 0 range 3 .. 3; ACB64_64BITS at 0 range 4 .. 4; NOFLOAT at 0 range 5 .. 5; KAST_NOFLOAT at 0 range 6 .. 6; USER_THREAD_ID_VALID at 0 range 7 .. 7; EXCLUSIVE at 1 range 0 .. 0; TOLERANT at 1 range 1 .. 1; FILLER_1 at 1 range 2 .. 23; end record; for ACB64_FLAGS_TYPE'SIZE use 32; ACB64_FLAGS_TYPE_INIT : constant ACB64_FLAGS_TYPE := (THREAD_SAFE => FALSE, THREAD_PID_VALID => FALSE, UPCALL => FALSE, FASTIO => FALSE, ACB64_64BITS => FALSE, NOFLOAT => FALSE, KAST_NOFLOAT => FALSE, USER_THREAD_ID_VALID => FALSE, EXCLUSIVE => FALSE, TOLERANT => FALSE, FILLER_1 => 0); type ACB64_TYPE is record ASTQFL : ADDRESS; -- AST QUEUE FORWARD LINK ASTQBL : ADDRESS; -- AST QUEUE BACKWARD LINK SIZE : UNSIGNED_WORD; -- STRUCTURE SIZE IN BYTES TYP : UNSIGNED_BYTE; -- STRUCTURE TYPE CODE RMOD : ACB64_RMOD_TYPE; -- REQUEST ACCESS MODE PID : UNSIGNED_LONGWORD; -- PROCESS ID OF REQUEST ACB64X : UNSIGNED_LONGWORD; -- OFFSET TO ACB64X STRUCTURE (Always equals ACB64$Q_AST in ACB64) FILLER_1 : UNSIGNED_LONGWORD; -- Not used in ACB64 (ASTPRM in ACB) FLAGS : ACB64_FLAGS_TYPE; -- AST CONTROL FLAGS THREAD_PID : UNSIGNED_LONGWORD; -- PID of actual target KTB KAST : ADDRESS; -- INTERNAL KERNEL MODE XFER ADDRESS FILLER_2 : UNSIGNED_LONGWORD; -- FILL TO QUADWORD ALIGN ACB64X AST : UNSIGNED_QUADWORD; -- 64-BIT AST ROUTINE ADDRESS ASTPRM : UNSIGNED_QUADWORD; -- 64-BIT AST PARAMETER USER_THREAD_ID : UNSIGNED_QUADWORD; -- Unique user thread identifier end record; for ACB64_TYPE use record ASTQFL at 0 range 0 .. 31; ASTQBL at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; RMOD at 11 range 0 .. 7; PID at 12 range 0 .. 31; ACB64X at 16 range 0 .. 31; FILLER_1 at 20 range 0 .. 31; FLAGS at 24 range 0 .. 31; THREAD_PID at 28 range 0 .. 31; KAST at 32 range 0 .. 31; FILLER_2 at 36 range 0 .. 31; AST at 40 range 0 .. 63; ASTPRM at 48 range 0 .. 63; USER_THREAD_ID at 56 range 0 .. 63; end record; for ACB64_TYPE'SIZE use 512; ACB64_TYPE_INIT : constant ACB64_TYPE := (ASTQFL => ADDRESS_ZERO, ASTQBL => ADDRESS_ZERO, SIZE => 0, TYP => 0, RMOD => ACB64_RMOD_TYPE_INIT, PID => 0, ACB64X => 0, FILLER_1 => 0, FLAGS => ACB64_FLAGS_TYPE_INIT, THREAD_PID => 0, KAST => ADDRESS_ZERO, FILLER_2 => 0, AST => (0, 0), ASTPRM => (0, 0), USER_THREAD_ID => (0, 0)); ACB64_K_LENGTH : constant := 64; -- Length of block. ACB64_C_LENGTH : constant := 64; -- Length of block. -- -- In order to make the inner mode semaphore history trace in SDA readable, -- the following symbols are defined. These are the values that are stored -- in the second longword of the semaphore history record. SDA automatically -- tries to symbolize these values. By creating named values, the semaphore -- history can be effectively read like prose. -- -- Note that __RELEASE_KERNEL_AST is defined by hand in ASTDEL_STACK.M64 -- ACQUIRE_SCH_QAST : constant := 180355072; ACQUIRE_KERNEL_AST : constant := 178257920; ACQUIRE_EXEC_AST : constant := 178323456; ACQUIRE_SPKAST : constant := 178388992; ACQUIRE_PIGGYBACK : constant := 178454528; RELEASE_KERNEL_AST : constant := 183500800; RELEASE_EXEC_AST : constant := 183566336; RELEASE_SPKAST : constant := 183631872; RELEASE_PIGGYBACK : constant := 183697408; RELEASE_AST_ERROR : constant := 183369728; RELEASE_ASTFAULT : constant := 183435264; end ACBDEF;