--******************************************************************************************************************** -- Created: 9-Mar-2021 22:28:35 by OpenVMS SDL EV3-3 -- Source: 01-AUG-2005 15:38:17 $1$DGA8085:[LIB_ADA.LIS]SSIDEF.SDL;1 --******************************************************************************************************************** with SYSTEM; use SYSTEM; with STARLET; use STARLET; with CONDITION_HANDLING; use CONDITION_HANDLING; package SSIDEF is -- module $SSIDEF -- -- System Service Intercept Control Block Definitions -- SSID_M_DOUBLE_MAP_FAILED : constant := 16#00000001#; SSID_M_PROMOTE_COPIED : constant := 16#00000002#; type SSID_BITS_TYPE is record DOUBLE_MAP_FAILED : BOOLEAN; -- Attempt to doublemap -- S2 promote area failed PROMOTE_COPIED : BOOLEAN; -- Process has a private copy -- of the promote area FILLER_1 : BIT_ARRAY (0 .. 61); end record; for SSID_BITS_TYPE use record DOUBLE_MAP_FAILED at 0 range 0 .. 0; PROMOTE_COPIED at 0 range 1 .. 1; FILLER_1 at 0 range 2 .. 63; end record; for SSID_BITS_TYPE'SIZE use 64; SSID_BITS_TYPE_INIT : constant SSID_BITS_TYPE := (DOUBLE_MAP_FAILED => FALSE, PROMOTE_COPIED => FALSE, FILLER_1 => (others => FALSE)); type SSID_SSI_DATA_TYPE is -- Definitions for flags in record -- CTL$GQ_SSI_DATA BITS : SSID_BITS_TYPE; end record; for SSID_SSI_DATA_TYPE use record BITS at 0 range 0 .. 63; end record; for SSID_SSI_DATA_TYPE'SIZE use 64; SSID_SSI_DATA_TYPE_INIT : constant SSID_SSI_DATA_TYPE := ( BITS => SSID_BITS_TYPE_INIT ); SSI_M_CLOSEST : constant := 16#00000001#; SSI_C_LENGTH : constant := 28; -- Length of SSI_BLOCK type SSI_FLINK_OVERLAY_TYPE is record FLINK : ADDRESS; -- Forward link ----Component(s) below are defined as comments since they ----overlap other fields ---- ----PRE_NEXT : ADDRESS; -- Pointer to next pre-processing routine end record; for SSI_FLINK_OVERLAY_TYPE use record FLINK at 0 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----PRE_NEXT at 0 range 0 .. 31; end record; for SSI_FLINK_OVERLAY_TYPE'SIZE use 32; SSI_FLINK_OVERLAY_TYPE_INIT : constant SSI_FLINK_OVERLAY_TYPE := (FLINK => ADDRESS_ZERO); type SSI_FLAGS_TYPE is -- Flags longword record CLOSEST : BOOLEAN; -- Closest to system service FILLER_1 : UNSIGNED_31; end record; for SSI_FLAGS_TYPE use record CLOSEST at 0 range 0 .. 0; FILLER_1 at 0 range 1 .. 31; end record; for SSI_FLAGS_TYPE'SIZE use 32; SSI_FLAGS_TYPE_INIT : constant SSI_FLAGS_TYPE := (CLOSEST => FALSE, FILLER_1 => 0); type SSI_BLOCK_TYPE is record FLINK_OVERLAY : SSI_FLINK_OVERLAY_TYPE; BLINK : ADDRESS; -- Backward link ----Component(s) below are defined as comments since they ----overlap other fields ---- ----POST_NEXT : ADDRESS; -- Pointer to next post-processing routine SIZE : UNSIGNED_WORD; -- Size, in bytes TYP : UNSIGNED_BYTE; -- Structure type code for SSI_BLOCK SUBTYP : UNSIGNED_BYTE; -- Structure subtype code VERSION : UNSIGNED_LONGWORD; -- Version number FLAGS : SSI_FLAGS_TYPE; -- Flags longword PRE_ROUTINE : ADDRESS; -- Address of pre-processing routine POST_ROUTINE : ADDRESS; -- Address of post-processing routine end record; for SSI_BLOCK_TYPE use record FLINK_OVERLAY at 0 range 0 .. 31; BLINK at 4 range 0 .. 31; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----POST_NEXT at 4 range 0 .. 31; SIZE at 8 range 0 .. 15; TYP at 10 range 0 .. 7; SUBTYP at 11 range 0 .. 7; VERSION at 12 range 0 .. 31; FLAGS at 16 range 0 .. 31; PRE_ROUTINE at 20 range 0 .. 31; POST_ROUTINE at 24 range 0 .. 31; end record; for SSI_BLOCK_TYPE'SIZE use 224; SSI_BLOCK_TYPE_INIT : constant SSI_BLOCK_TYPE := ( FLINK_OVERLAY => SSI_FLINK_OVERLAY_TYPE_INIT, BLINK => ADDRESS_ZERO, SIZE => 0, TYP => 0, SUBTYP => 0, VERSION => 0, FLAGS => SSI_FLAGS_TYPE_INIT, PRE_ROUTINE => ADDRESS_ZERO, POST_ROUTINE => ADDRESS_ZERO); -- -- Definition for System Service Intercept Specific Service Control Block -- SSISP_M_NOT_AVAIL : constant := 16#00000001#; SSISP_C_LENGTH : constant := 48; -- Length of SSI_SPEC_BLOCK type SSISP_FLAGS_TYPE is -- Service-specific flags longword record NOT_AVAIL : BOOLEAN; -- Service may not be intercepted: -- e.g., SYS$SRCHANDLER, etc. FILLER_1 : UNSIGNED_31; end record; for SSISP_FLAGS_TYPE use record NOT_AVAIL at 0 range 0 .. 0; FILLER_1 at 0 range 1 .. 31; end record; for SSISP_FLAGS_TYPE'SIZE use 32; SSISP_FLAGS_TYPE_INIT : constant SSISP_FLAGS_TYPE := (NOT_AVAIL => FALSE, FILLER_1 => 0); type SSISP_SSI_SPEC_BLOCK_TYPE is record PRE_NEXT : ADDRESS; -- Forward link PRE_PROC_COUNT : INTEGER_32; -- Number of SSIs on list POST_NEXT : ADDRESS; -- Forward link POST_PROC_COUNT : INTEGER_32; -- Number of SSIs on list ORIGINAL_BUNDLE : UNSIGNED_LONGWORD_ARRAY(0 .. 3); -- On I64, orig. bundle contents -- before replacement REPLACEMENT : UNSIGNED_QUADWORD; -- On I64, code entry of -- replacement routine FLAGS : SSISP_FLAGS_TYPE; -- Service-specific flags longword FILLER_1 : UNSIGNED_LONGWORD; -- Pad to integral number of quadwords end record; for SSISP_SSI_SPEC_BLOCK_TYPE use record PRE_NEXT at 0 range 0 .. 31; PRE_PROC_COUNT at 4 range 0 .. 31; POST_NEXT at 8 range 0 .. 31; POST_PROC_COUNT at 12 range 0 .. 31; ORIGINAL_BUNDLE at 16 range 0 .. 127; REPLACEMENT at 32 range 0 .. 63; FLAGS at 40 range 0 .. 31; FILLER_1 at 44 range 0 .. 31; end record; for SSISP_SSI_SPEC_BLOCK_TYPE'SIZE use 384; SSISP_SSI_SPEC_BLOCK_TYPE_INIT : constant SSISP_SSI_SPEC_BLOCK_TYPE := (PRE_NEXT => ADDRESS_ZERO, PRE_PROC_COUNT => 0, POST_NEXT => ADDRESS_ZERO, POST_PROC_COUNT => 0, ORIGINAL_BUNDLE => (0, 0, 0, 0), REPLACEMENT => (0, 0), FLAGS => SSISP_FLAGS_TYPE_INIT, FILLER_1 => 0); -- -- Extensions to bound procedure descriptors for System Service Intercept -- type SSI_PDSC_FILL_10_TYPE is record SS_SSADR : ADDRESS; end record; for SSI_PDSC_FILL_10_TYPE use record SS_SSADR at 0 range 0 .. 31; end record; for SSI_PDSC_FILL_10_TYPE'SIZE use 32; SSI_PDSC_FILL_10_TYPE_INIT : constant SSI_PDSC_FILL_10_TYPE := (SS_SSADR => ADDRESS_ZERO); type SSI_PDSC_FILL_12_TYPE is record REPLACEMENT_ROUTINE : ADDRESS; end record; for SSI_PDSC_FILL_12_TYPE use record REPLACEMENT_ROUTINE at 0 range 0 .. 31; end record; for SSI_PDSC_FILL_12_TYPE'SIZE use 32; SSI_PDSC_FILL_12_TYPE_INIT : constant SSI_PDSC_FILL_12_TYPE := (REPLACEMENT_ROUTINE => ADDRESS_ZERO); type SSI_PDSC_TYPE is record FILLER_1 : UNSIGNED_QUADWORD; -- Quadword which contains flags FILLER_2 : UNSIGNED_QUADWORD; -- Quadword which contains entry address FILLER_3 : UNSIGNED_QUADWORD; -- Quadword which contains bound procedure value SS_SSADR : UNSIGNED_QUADWORD; -- Address of system service in system space ----Component(s) below are defined as comments since they ----overlap other fields ---- ----FILL_10 : SSI_PDSC_FILL_10_TYPE; REPLACEMENT_ROUTINE : UNSIGNED_QUADWORD; -- Address of replacement routine ----Component(s) below are defined as comments since they ----overlap other fields ---- ----FILL_12 : SSI_PDSC_FILL_12_TYPE; end record; for SSI_PDSC_TYPE use record FILLER_1 at 0 range 0 .. 63; FILLER_2 at 8 range 0 .. 63; FILLER_3 at 16 range 0 .. 63; SS_SSADR at 24 range 0 .. 63; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----FILL_10 at 24 range 0 .. 31; REPLACEMENT_ROUTINE at 32 range 0 .. 63; ----Component representation spec(s) below are defined as ----comments since they overlap other fields ---- ----FILL_12 at 32 range 0 .. 31; end record; for SSI_PDSC_TYPE'SIZE use 320; SSI_PDSC_TYPE_INIT : constant SSI_PDSC_TYPE := (FILLER_1 => (0, 0), FILLER_2 => (0, 0), FILLER_3 => (0, 0), SS_SSADR => (0, 0), REPLACEMENT_ROUTINE => (0, 0) ); -- -- Function prototypes -- procedure SSI_GET_INTERCEPT_MAIN ( STATUS : out INTEGER_32); -- return value pragma INTERFACE (EXTERNAL, SSI_GET_INTERCEPT_MAIN); pragma IMPORT_VALUED_PROCEDURE (SSI_GET_INTERCEPT_MAIN, "SSI$GET_INTERCEPT_MAIN", (INTEGER_32), (VALUE)); procedure SSI_DECLARE_INTERCEPT ( STATUS : out INTEGER_32; -- return value SSI_BLOCK_PTR : in ADDRESS); pragma INTERFACE (EXTERNAL, SSI_DECLARE_INTERCEPT); pragma IMPORT_VALUED_PROCEDURE (SSI_DECLARE_INTERCEPT, "SSI$DECLARE_INTERCEPT", (INTEGER_32, ADDRESS), (VALUE, REFERENCE)); procedure SSI_CANCEL_INTERCEPT ( STATUS : out INTEGER_32; -- return value SSI_BLOCK_PTR : in ADDRESS); pragma INTERFACE (EXTERNAL, SSI_CANCEL_INTERCEPT); pragma IMPORT_VALUED_PROCEDURE (SSI_CANCEL_INTERCEPT, "SSI$CANCEL_INTERCEPT", (INTEGER_32, ADDRESS), (VALUE, REFERENCE)); procedure SSI_DECLARE_REPLACEMENT ( STATUS : out INTEGER_32; -- return value PS_SSADR : in ADDRESS; REPLACEMENT_ROUTINE : in ADDRESS); pragma INTERFACE (EXTERNAL, SSI_DECLARE_REPLACEMENT); pragma IMPORT_VALUED_PROCEDURE (SSI_DECLARE_REPLACEMENT, "SSI$DECLARE_REPLACEMENT", (INTEGER_32, ADDRESS, ADDRESS), (VALUE, REFERENCE, REFERENCE)); procedure SSI_CANCEL_REPLACEMENT ( STATUS : out INTEGER_32; -- return value PS_SSADR : in ADDRESS; REPLACEMENT_ROUTINE : in ADDRESS); pragma INTERFACE (EXTERNAL, SSI_CANCEL_REPLACEMENT); pragma IMPORT_VALUED_PROCEDURE (SSI_CANCEL_REPLACEMENT, "SSI$CANCEL_REPLACEMENT", (INTEGER_32, ADDRESS, ADDRESS), (VALUE, REFERENCE, REFERENCE)); procedure SSI_DECLARE_SPEC_INTERCEPT ( STATUS : out INTEGER_32; -- return value SSI_FD_PTR : in ADDRESS; SSI_BLOCK_PTR : in ADDRESS); pragma INTERFACE (EXTERNAL, SSI_DECLARE_SPEC_INTERCEPT); pragma IMPORT_VALUED_PROCEDURE (SSI_DECLARE_SPEC_INTERCEPT, "SSI$DECLARE_SPEC_INTERCEPT", (INTEGER_32, ADDRESS, ADDRESS), (VALUE, REFERENCE, REFERENCE)); procedure SSI_CANCEL_SPEC_INTERCEPT ( STATUS : out INTEGER_32; -- return value SSI_FD_PTR : in ADDRESS; SSI_BLOCK_PTR : in ADDRESS); pragma INTERFACE (EXTERNAL, SSI_CANCEL_SPEC_INTERCEPT); pragma IMPORT_VALUED_PROCEDURE (SSI_CANCEL_SPEC_INTERCEPT, "SSI$CANCEL_SPEC_INTERCEPT", (INTEGER_32, ADDRESS, ADDRESS), (VALUE, REFERENCE, REFERENCE)); -- -- Define a constant to be placed in the SSI$L_VERSION field of the SSI block. -- SYS$SSISHR will verify that the contents of the SSI$L_VERSION field match -- the constant below. If for any reason a change in the SSI interface occurs -- (as it did because of the 64-Bit Project) the version number must change, as -- must the name of this constant. A change of the symbol name enables users -- of SSI to realize at compile-time that SSI has changed. If the value -- of the constant changed without an accompanying symbol name change, SSI -- cannot determine whether its callers are aware of an SSI interface change. -- SSI_C_VERSION_QUAD_LIST : constant := 65536; SSI_K_VERSION_QUAD_LIST : constant := 65536; end SSIDEF;