/**/ /***************************************************************************/ /** **/ /** © Copyright 2010, Hewlett-Packard Development Company, L.P. **/ /** **/ /** Confidential computer software. Valid license from HP and/or **/ /** its subsidiaries required for possession, use, or copying. **/ /** **/ /** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, **/ /** Computer Software Documentation, and Technical Data for Commercial **/ /** Items are licensed to the U.S. Government under vendor's standard **/ /** commercial license. **/ /** **/ /** Neither HP nor any of its subsidiaries shall be liable for technical **/ /** or editorial errors or omissions contained herein. The information **/ /** in this document is provided "as is" without warranty of any kind and **/ /** is subject to change without notice. The warranties for HP products **/ /** are set forth in the express limited warranty statements accompanying **/ /** such products. Nothing herein should be construed as constituting an **/ /** additional warranty. **/ /** **/ /***************************************************************************/ /********************************************************************************************************************************/ /* Created: 30-Mar-2010 17:38:03 by OpenVMS SDL EV3-3 */ /* Source: 24-MAY-2006 19:59:00 $1$DGA7274:[LIB_H.SRC]KPBDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $KPBDEF ***/ #ifndef __KPBDEF_LOADED #define __KPBDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /*+ */ /* KPB - Kernel Process Block */ /* */ /* The Kernel Process Block contains the saved registers, state and */ /* stack pointer for a kernel process. */ /* */ /* The KPB consists of 5 areas: */ /* */ /* 1 Base, */ /* 2a Scheduling, */ /* 2b VMS Special Parameters, */ /* 3 Spinlock, */ /* 4 Debug, and */ /* 5 General Parameters */ /* */ /* The KPB can be used in one of two general types: the VMS executive sofware */ /* type (VEST) and the fully general type (FGT). */ /* */ /* In the VEST KPB, the relationship of KPB sections 1 thru 3 are fixed into */ /* the relationship shown in this structure defintion file. Since the */ /* relationships between the VEST KPB fields are fixed, all major fields */ /* can be addressed relative to a single pointer register. This reduces */ /* the number of indirect reference operations and increases performance. */ /* The penality for the improved performance is a non-dynamic structure */ /* format. In VEST KPBs, the Spinlock area is optional. This causes the */ /* Debug area to be variably located. Typically, VEST KPBs do not use the */ /* General Parameters area. */ /* */ /* In the FGT KPB, only the KPB Base section has the format described in */ /* this structure definition file. In addition, the KPB VMS Special */ /* Parameters section is not present in FGT KPBs. Since the KPB Base size */ /* is fixed, the KPB Scheduling section can be referenced using offsets from */ /* the KPB base pointer register. All other sections are variable sized, */ /* and must be referenced through the pointers provided in the KPB Base. */ /* */ /* *NB* - The length of each integer numbered area above is rounded to an */ /* integral number of quadwords. */ /* */ /* This module also symbolically defines the flags parameter value calls */ /* to EXE$KP_ALLOCATE_KPB. */ /* */ /*- */ #include /* Define the TQE type; UCB contains a pointer */ #include /* Define the FKB type; UCB contains a pointer */ #define KPBDBG$K_PC_VEC_CNT 8 /* Size of PC vector */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _kpbdbg { #pragma __nomember_alignment unsigned int kpbdbg$is_start_time; /* Time of last start/restart */ unsigned int kpbdbg$is_start_count; /* Count of STARTs */ unsigned int kpbdbg$is_restart_count; /* Count of RESTARTs */ unsigned int kpbdbg$is_vec_index; /* PC vector index */ int (*kpbdbg$is_pc_vec [8])(); /* PC trace vector */ } KPBDBG; #define KPBDBG$K_LENGTH 48 /* Length of KPB Debug section */ #define KPBDBG$S_KPBDBGDEF 48 /* Old size name, synonym for KPBDBG$S_KPBDBG */ /* Bliss complains about there being two definitions for SPL_CTX$V_VALID, */ /* so this structure is only defined for all the langauages I can find */ /* which are not Bliss variants */ #define SPL_CTX$M_FORK 0x1 #define SPL_CTX$M_PORT 0x2 #define SPL_CTX$M_DYN 0x4 #define SPL_CTX$M_SPL_BITS 7 /* Keep NOT_REL bits in same relative */ #define SPL_CTX$V_NOT_REL 4 /* Bit-shift for not-releaseable bits */ #define SPL_CTX$M_FORK_NOT_REL 0x10 #define SPL_CTX$M_PORT_NOT_REL 0x20 #define SPL_CTX$M_DYN_NOT_REL 0x40 #define SPL_CTX$M_NOT_REL_BITS 112 /* These parameter bits may or may not be stored */ #define SPL_CTX$M_MIN 0x100 #define SPL_CTX$M_MIN_OK 0x200 #define SPL_CTX$M_PARAM_BITS 768 #define SPL_CTX$V_VALID 30 /* Bit-shift for valid bit */ #define SPL_CTX$M_VALID 0x40000000 #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __longword #else #pragma __nomember_alignment #endif typedef struct _spl_ctx { /* X-28 */ #pragma __nomember_alignment unsigned spl_ctx$v_fork : 1; /* Fork spinlock owned */ unsigned spl_ctx$v_port : 1; /* Port spinlock owned */ unsigned spl_ctx$v_dyn : 1; /* Dynamic spinlock owned */ unsigned spl_ctx$v_rsvd0 : 1; /* Fill out nibble */ /* order as the spinlock bits above */ unsigned spl_ctx$v_fork_not_rel : 1; /* Fork spinlock is not releaseable */ unsigned spl_ctx$v_port_not_rel : 1; /* Port spinlock is not releaseable */ unsigned spl_ctx$v_dyn_not_rel : 1; /* Dynamic spinlock is not releaseable */ unsigned spl_ctx$v_rsvd1 : 1; /* Fill out nibble */ unsigned spl_ctx$v_min : 1; /* Establish minimum spinlock context */ unsigned spl_ctx$v_min_ok : 1; /* Establish minimum spinlock context if possible */ unsigned spl_ctx$v_rsvd2 : 2; /* Fill out nibble */ unsigned spl_ctx$v_rsvd3 : 18; /* Clear to just under LW sign bit */ unsigned spl_ctx$v_valid : 1; /* To avoid treating an SVA as a SPL_CTX, */ /* negative SPL_CTX values are invalid */ unsigned spl_ctx$v_fill_0_ : 1; } SPL_CTX; #ifdef __cplusplus /* Define structure prototypes */ struct _spl; #endif /* #ifdef __cplusplus */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _kpbspl { #pragma __nomember_alignment void (*kpbspl$ps_spl_stall_rtn)(); /* Spinlock STALL handling routine pointer */ void (*kpbspl$ps_spl_restrt_rtn)(); /* Spinlock RESTART handling routine pointer */ /* X-28 */ struct _spl *kpbspl$ps_spl_fork; /* Fork spinlock address */ struct _spl *kpbspl$ps_spl_port; /* Port spinlock address */ struct _spl *kpbspl$ps_spl_dyn; /* Dynamic spinlock address */ __union { int kpbspl$l_ipl; /* IPL of all spinlocks as longword */ __struct { unsigned char kpbspl$b_ipl; /* IPL of all spinlocks as byte */ } kpbspl$r_fill_2_; } kpbspl$r_fill_1_; /* End IPL union */ int kpbspl$l_saved_spl_ctx; /* Re/starter's spinlock context */ int kpbspl$l_archived_spl_ctx; /* X-30 Spinlock contexts archived since re/start */ int kpbspl$l_req_spl_ctx; /* Requested spinlock context */ int kpbspl$l_fork_own_cnt; /* Fork SPL$L_OWN_COUNT on re/start */ } KPBSPL; #if !defined(__VAXC) #define kpbspl$l_ipl kpbspl$r_fill_1_.kpbspl$l_ipl #define kpbspl$b_ipl kpbspl$r_fill_1_.kpbspl$r_fill_2_.kpbspl$b_ipl #endif /* #if !defined(__VAXC) */ #define KPBSPL$K_LENGTH 40 /* Length of KPB Spinlock section */ #define KPBSPL$S_KPBSPLDEF 40 /* Old size name, synonym for KPBSPL$S_KPBSPL */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _kpbsch { #pragma __nomember_alignment void (*kpbsch$ps_sch_stall_rtn)(); /* Scheduling STALL handling routine pointer */ void (*kpbsch$ps_sch_restrt_rtn)(); /* Scheduling RESTART handling routine pointer */ struct _fkb *kpbsch$ps_fkblk; /* pointer to a fork BLOCK */ void (*kpbsch$ps_sch_end_rtn)(); /* Scheduling END handling routine pointer */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __union { unsigned char kpbsch$b_fkb [48]; #pragma __nomember_alignment __struct { struct _fkb *kpbsch$ps_fqfl; /* fork queue flink */ struct _fkb *kpbsch$ps_fqbl; /* fork queue blink */ unsigned short int kpbsch$iw_fkb_size; /* fork block size */ unsigned char kpbsch$ib_fkb_type; /* fork block type */ unsigned char kpbsch$ib_flck; /* fork lock */ void (*kpbsch$ps_fpc)(); /* fork PC */ __int64 kpbsch$q_fr3; /* fork R3 */ __int64 kpbsch$q_fr4; /* fork R4 */ } kpbsch$r_fkb; #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif unsigned char kpbsch$b_tqe [64]; #pragma __nomember_alignment __struct { struct _tqe *kpbsch$ps_tqfl; /* timer queue flink */ struct _tqe *kpbsch$ps_tqbl; /* timer queue blink */ unsigned short int kpbsch$iw_tqe_size; /* TQE size */ unsigned char kpbsch$ib_tqe_type; /* TQE type */ unsigned char kpbsch$ib_rqtype; /* timer request type */ void (*kpbsch$ps_tqe_fpc)(); /* timer routine pointer */ __int64 kpbsch$q_tqe_fr3; /* timer routine R3 */ __int64 kpbsch$q_tqe_fr4; /* timer routine R4 */ __int64 kpbsch$iq_time; /* timer due time */ __int64 kpbsch$q_fill_delta; int kpbsch$l_fill_rmod; int kpbsch$l_fill_efn; int kpbsch$l_fill_rqpid; int kpbsch$l_fill_cputim; } kpbsch$r_tqe; } kpbsch$r_sch_blocks; } KPBSCH; #if !defined(__VAXC) #define kpbsch$ps_fqfl kpbsch$r_sch_blocks.kpbsch$r_fkb.kpbsch$ps_fqfl #define kpbsch$ps_fqbl kpbsch$r_sch_blocks.kpbsch$r_fkb.kpbsch$ps_fqbl #define kpbsch$iw_fkb_size kpbsch$r_sch_blocks.kpbsch$r_fkb.kpbsch$iw_fkb_size #define kpbsch$ib_fkb_type kpbsch$r_sch_blocks.kpbsch$r_fkb.kpbsch$ib_fkb_type #define kpbsch$ib_flck kpbsch$r_sch_blocks.kpbsch$r_fkb.kpbsch$ib_flck #define kpbsch$ps_fpc kpbsch$r_sch_blocks.kpbsch$r_fkb.kpbsch$ps_fpc #define kpbsch$q_fr3 kpbsch$r_sch_blocks.kpbsch$r_fkb.kpbsch$q_fr3 #define kpbsch$q_fr4 kpbsch$r_sch_blocks.kpbsch$r_fkb.kpbsch$q_fr4 #define kpbsch$ps_tqfl kpbsch$r_sch_blocks.kpbsch$r_tqe.kpbsch$ps_tqfl #define kpbsch$ps_tqbl kpbsch$r_sch_blocks.kpbsch$r_tqe.kpbsch$ps_tqbl #define kpbsch$iw_tqe_size kpbsch$r_sch_blocks.kpbsch$r_tqe.kpbsch$iw_tqe_size #define kpbsch$ib_tqe_type kpbsch$r_sch_blocks.kpbsch$r_tqe.kpbsch$ib_tqe_type #define kpbsch$ib_rqtype kpbsch$r_sch_blocks.kpbsch$r_tqe.kpbsch$ib_rqtype #define kpbsch$ps_tqe_fpc kpbsch$r_sch_blocks.kpbsch$r_tqe.kpbsch$ps_tqe_fpc #define kpbsch$q_tqe_fr3 kpbsch$r_sch_blocks.kpbsch$r_tqe.kpbsch$q_tqe_fr3 #define kpbsch$q_tqe_fr4 kpbsch$r_sch_blocks.kpbsch$r_tqe.kpbsch$q_tqe_fr4 #define kpbsch$iq_time kpbsch$r_sch_blocks.kpbsch$r_tqe.kpbsch$iq_time #endif /* #if !defined(__VAXC) */ #define KPBSCH$K_LENGTH 80 /* Length of KPB Scheduling section */ #define KPBSCH$S_KPBSCHDEF 80 /* Old size name, synonym for KPBSCH$S_KPBSCH */ #define KP$M_VEST 0x4 #define KP$M_SPLOCK 0x20 #define KP$M_DEBUG 0x40 #define KP$M_DEALLOC_AT_END 0x100 #define KP$M_SAVE_FP 0x1000 #define KP$M_SET_STACK_LIMITS 0x8000 #define KP$M_IO 292 /* The right flags for I/O */ #define KP$M_LKMGR 4 /* The right flags for the lock manager */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __longword #else #pragma __nomember_alignment #endif typedef struct _kpflags { #pragma __nomember_alignment __union { int kp$is_flags; __struct { unsigned kp$v_fill1 : 2; unsigned kp$v_vest : 1; /* KPB VEST format required */ unsigned kp$v_fill2 : 2; unsigned kp$v_splock : 1; /* Spinlock (3) area required */ unsigned kp$v_debug : 1; /* Debug (4) area present */ unsigned kp$v_fill3 : 1; unsigned kp$v_dealloc_at_end : 1; /* KP_END should call KP_DEALLOCATE */ unsigned kp$v_fill4 : 3; unsigned kp$v_save_fp : 1; /* Save FP registers on context switch (IA64 only) */ unsigned kp$v_fill5 : 2; unsigned kp$v_set_stack_limits : 1; /* Call SETSTK_64 on every stack switch */ unsigned kp$v_fill6 : 3; unsigned kp$v_fill7 : 2; unsigned kp$v_fill_rsvd : 9; unsigned kp$v_fill_mode : 2; } kp$r_fill_4_; } kp$r_fill_3_; } KPFLAGS; #if !defined(__VAXC) #define kp$v_vest kp$r_fill_3_.kp$r_fill_4_.kp$v_vest #define kp$v_splock kp$r_fill_3_.kp$r_fill_4_.kp$v_splock #define kp$v_debug kp$r_fill_3_.kp$r_fill_4_.kp$v_debug #define kp$v_dealloc_at_end kp$r_fill_3_.kp$r_fill_4_.kp$v_dealloc_at_end #define kp$v_save_fp kp$r_fill_3_.kp$r_fill_4_.kp$v_save_fp #define kp$v_set_stack_limits kp$r_fill_3_.kp$r_fill_4_.kp$v_set_stack_limits #endif /* #if !defined(__VAXC) */ #define KP$S_KPDEF 4 /* Old size name, synonym for KP$S_KPFLAGS */ #define KP$M_LOCK_MEM_STACK 0x1 #define KP$M_LOCK_RSE_STACK 0x2 #define KP$M_BOTH_STACKS 3 #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __longword #else #pragma __nomember_alignment #endif typedef struct _kplckflags { #pragma __nomember_alignment __union { int kp$is_lckflags; __struct { unsigned kp$v_lock_mem_stack : 1; /* Lock main or memory stack */ unsigned kp$v_lock_rse_stack : 1; /* Lock RSE stack (IA64) */ unsigned kp$v_fill_7_ : 6; } kp$r_fill_6_; } kp$r_fill_5_; } KPLCKFLAGS; #if !defined(__VAXC) #define kp$v_lock_mem_stack kp$r_fill_5_.kp$r_fill_6_.kp$v_lock_mem_stack #define kp$v_lock_rse_stack kp$r_fill_5_.kp$r_fill_6_.kp$v_lock_rse_stack #endif /* #if !defined(__VAXC) */ #define KPB$K_MIN_IO_STACK 8192 /* Minimum I/O stack size in bytes */ #define KPB$K_MAX_MPW_STACK 8192 /* Maximum stack needed for page writes */ #define KPB$M_VALID 0x1 #define KPB$M_ACTIVE 0x2 #define KPB$M_VEST 0x4 #define KPB$M_DELETING 0x8 #define KPB$M_SCHED 0x10 #define KPB$M_SPLOCK 0x20 #define KPB$M_DEBUG 0x40 #define KPB$M_PARAM 0x80 #define KPB$M_DEALLOC_AT_END 0x100 #define KPB$M_BYPASS_CACHE 0x200 #define KPB$M_HLL_MASK 0x400 #define KPB$M_RESERVED_CACHE 0x800 #define KPB$M_SAVE_FP 0x1000 #define KPB$M_MEM_STACK_LOCKED 0x2000 #define KPB$M_RSE_STACK_LOCKED 0x4000 #define KPB$M_SET_STACK_LIMITS 0x8000 #define KPB$M_TQE_WAIT 0x10000 #define KPB$M_FORK 0x20000 #define KPB$M_FORK_WAIT 0x40000 #define KPB$M_SAVED_DEALLOC_AT_END 0x80000 #define KPB$M_SPL_CTX 0x100000 #define KPB$M_RSVD 0x3FE00000 #define KPB$M_ACMODE 0xC0000000 #define KPB$M_STALL_CTX_BITS 458752 #define KPREG$K_MIN_REG_MASK 738258944 /* Minimum register mask */ #define KPREG$K_MIN_IO_REG_MASK 738259004 /* Min I/O register mask */ #define KPREG$K_ERR_REG_MASK -738263037 /* Error mask */ #define KPREG$K_HLL_REG_MASK 738263036 /* Default HLL mask */ #define KPB$K_LENGTH 192 /* Length of KPB base section */ #define KPB$K_TQE_LENGTH 64 /* length of TQE block */ #define KPB$K_NON_VEST_LENGTH 272 /* End of NON_VEST KPB offsets */ /* Begin VMS Special Parameters Area */ #define KPB$K_KEEP 1 #define KPB$K_RELEASE 2 #define KPB$K_LOW 3 #define KPB$K_HIGH 4 #define KPB$K_SCH_LENGTH 320 /* Length of KPB + SCH */ #ifdef __cplusplus /* Define structure prototypes */ struct _ucb; struct _irp; struct _spl; struct _lkb; #endif /* #ifdef __cplusplus */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _kpb { #pragma __nomember_alignment struct _kpb *kpb$ps_flink; /* Forward link */ struct _kpb *kpb$ps_blink; /* Backward link */ unsigned short int kpb$iw_size; /* Structure size in bytes */ unsigned char kpb$ib_type; /* Structure type */ unsigned char kpb$ib_subtype; /* Structure subtype */ unsigned int kpb$is_stack_size; /* Stack size in bytes */ __union { __union { unsigned int kpb$is_flags; /* Flags bitmask */ __struct { unsigned kpb$v_valid : 1; /* KPB is valid */ unsigned kpb$v_active : 1; /* KPB is in active use */ unsigned kpb$v_vest : 1; /* KPB is VEST format */ unsigned kpb$v_deleting : 1; /* KPB is being deleted */ unsigned kpb$v_sched : 1; /* Scheduling (2) area present */ unsigned kpb$v_splock : 1; /* Spinlock (3) area present */ unsigned kpb$v_debug : 1; /* Debug (4) area present */ unsigned kpb$v_param : 1; /* Parameter (5) area present */ unsigned kpb$v_dealloc_at_end : 1; /* KP_END should call KP_DEALLOCATE */ unsigned kpb$v_bypass_cache : 1; /* Don't cache KPB on deallocation */ unsigned kpb$v_hll_mask : 1; /* Register mask is HLL_REG_MASK */ unsigned kpb$v_reserved_cache : 1; /* Use reserved KPB cache */ unsigned kpb$v_save_fp : 1; /* Caller requires FP state saved (IA64 only) */ unsigned kpb$v_mem_stack_locked : 1; /* Stack pages locked in WS */ unsigned kpb$v_rse_stack_locked : 1; /* Stack pages locked in WS */ unsigned kpb$v_set_stack_limits : 1; /* Call SETSTK_64 on every stack switch */ unsigned kpb$v_tqe_wait : 1; /* X-28 Stalled by EXE$KP_TQE_WAIT */ unsigned kpb$v_fork : 1; /* X-28 Stalled by EXE$KP_FORK */ unsigned kpb$v_fork_wait : 1; /* X-28 Stalled by EXE$KP_FORK_WAIT */ unsigned kpb$v_saved_dealloc_at_end : 1; /* X-28 Bit saved & cleared to force execution of KPB$PS_SCH_END */ unsigned kpb$v_spl_ctx : 1; /* X-28 KPB has been SPL_CTX-initialized */ unsigned kpb$v_rsvd : 9; /* Reserved for future flags */ unsigned kpb$v_acmode : 2; /* Original mode of KP */ } kpb$r_fill_9_; } kpb$r_fill_8_; } kpb$r_flags_overlay; unsigned int kpb$is_reg_mask; /* Register save mask */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __union { #pragma __nomember_alignment void *kpb$ps_saved_sp; /* Previous stack pointer */ #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ void *kpb$pq_saved_sp; /* Previous stack pointer */ #else unsigned __int64 kpb$pq_saved_sp; #endif } kpb$r_save_sp_overlay; #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __union { #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif void *kpb$ps_stack_base; /* Stack base address */ #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ void *kpb$pq_stack_base; /* Stack base address */ #else unsigned __int64 kpb$pq_stack_base; #endif } kpb$r_stack_base_overlay; #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __union { #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif void *kpb$ps_stack_sp; /* Current SP */ #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ void *kpb$pq_stack_sp; /* Current SP */ #else unsigned __int64 kpb$pq_stack_sp; #endif } kpb$r_stack_sp_overlay; #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif void *kpb$ps_sch_ptr; /* Address of SCH area */ void *kpb$ps_spl_ptr; /* Address of SPL area */ void *kpb$ps_dbg_ptr; /* Address of DBG area */ void *kpb$ps_prm_ptr; /* Address of PRM area */ unsigned int kpb$is_prm_length; /* Length of PRM area */ unsigned int kpb$is_rse_stack_length; /* Size of RSE backing store (bytes) */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ void *kpb$pq_rse_stack_base; /* RSE backing store pointer */ #else unsigned __int64 kpb$pq_rse_stack_base; #endif #pragma __nomember_alignment unsigned __int64 kpb$q_region_id; /* Used for p2 allocations */ #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ void *kpb$pq_prv_mem_base; /* returned by SETSTK_64 */ #else unsigned __int64 kpb$pq_prv_mem_base; #endif unsigned __int64 kpb$q_prv_mem_len; /* returned by SETSTK_64 */ #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ void *kpb$pq_prv_rse_base; /* returned by SETSTK_64 */ #else unsigned __int64 kpb$pq_prv_rse_base; #endif unsigned __int64 kpb$q_prv_rse_len; /* returned by SETSTK_64 */ unsigned __int64 kpb$q_mem_region_id; /* Used for mem stack regions */ __int64 kpb$q_rsrvd_future [8]; /* Cells for future use */ #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif void (*kpb$ps_sch_stall_rtn)(); /* Scheduling STALL handling routine pointer */ void (*kpb$ps_sch_restrt_rtn)(); /* Scheduling RESTART handling routine pointer */ struct _fkb *kpb$ps_fkblk; /* pointer to a fork block */ void (*kpb$ps_sch_end_rtn)(); /* Scheduling END handling routine pointer */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __union { unsigned char kpb$b_fkb [48]; #pragma __nomember_alignment __struct { struct _fkb *kpb$ps_fqfl; /* fork queue flink */ struct _fkb *kpb$ps_fqbl; /* fork queue blink */ unsigned short int kpb$iw_fkb_size; /* fork block size */ unsigned char kpb$ib_fkb_type; /* fork block type */ unsigned char kpb$ib_flck; /* fork lock */ void (*kpb$ps_fpc)(); /* fork PC */ __int64 kpb$q_fr3; /* fork R3 */ __int64 kpb$q_fr4; /* fork R4 */ } kpb$r_fkb; #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif unsigned char kpb$b_tqe [64]; #pragma __nomember_alignment __struct { struct _tqe *kpb$ps_tqfl; /* timer queue flink */ struct _tqe *kpb$ps_tqbl; /* timer queue blink */ unsigned short int kpb$iw_tqe_size; /* TQE size */ unsigned char kpb$ib_tqe_type; /* TQE type */ unsigned char kpb$ib_rqtype; /* timer request type */ void (*kpb$ps_tqe_fpc)(); /* timer routine pointer */ __int64 kpb$q_tqe_fr3; /* timer routine R3 */ __int64 kpb$q_tqe_fr4; /* timer routine R4 */ __int64 kpb$iq_time; /* timer due time */ __int64 kpb$q_fill_delta; int kpb$l_fill_rmod; int kpb$l_fill_efn; int kpb$l_fill_rqpid; int kpb$l_fill_cputim; } kpb$r_tqe; } kpb$r_sch_blocks; /* (VEST KPB's only) */ __union { __struct { struct _ucb *kpb$ps_ucb; /* UCB address */ struct _irp *kpb$ps_irp; /* IRP address */ /* vestioblks union fill; */ __struct { unsigned int kpb$is_timeout_time; /* WFI%%CH time out time */ unsigned int kpb$is_restore_ipl; /* WFI%%CH IPL to restore */ unsigned int kpb$is_channel_data; /* WFI%%CH/REQCHN channel data */ } kpb$r_iocblk; __struct { void *kpb$ps_scsi_ptr1; /* SCSI gen. struc ptr #1 */ void *kpb$ps_scsi_ptr2; /* SCSI gen. struc ptr #2 */ void *kpb$ps_scsi_scdrp; /* SCSI transfer SCDRP addr. */ } kpb$r_scsiblk; __struct { unsigned int kpb$is_timeout; /* time out time */ unsigned int kpb$is_newipl; /* IPL to restore */ struct _spl *kpb$ps_dlck; /* device spin lock */ } kpb$r_interruptblk; } kpb$r_vestio; /* end vestio; */ __struct { struct _lkb *kpb$ps_lkb; /* LKB address */ } kpb$r_vestlmgr; } kpb$r_vestprm; char kpb$t_align_7 [4]; /* QUADWORD ALIGN */ void (*kpb$ps_spl_stall_rtn)(); /* Spinlock STALL handling routine pointer */ void (*kpb$ps_spl_restrt_rtn)(); /* Spinlock RESTART handling routine pointer */ /* X-28 */ struct _spl *kpb$ps_spl_fork; /* Fork spinlock address */ struct _spl *kpb$ps_spl_port; /* Port spinlock address */ struct _spl *kpb$ps_spl_dyn; /* Dynamic spinlock address */ __union { int kpb$l_ipl; /* IPL of all spinlocks as longword */ __struct { unsigned char kpb$b_ipl; /* IPL of all spinlocks as byte */ } kpb$r_fill_11_; } kpb$r_fill_10_; /* End IPL union */ int kpb$l_saved_spl_ctx; /* Re/starter's spinlock context */ int kpb$l_archived_spl_ctx; /* X-30 Spinlock contexts archived since re/start */ int kpb$l_req_spl_ctx; /* Requested spinlock context */ int kpb$l_fork_own_cnt; /* Fork SPL$L_OWN_COUNT on re/start */ } KPB; #if !defined(__VAXC) #define kpb$is_flags kpb$r_flags_overlay.kpb$r_fill_8_.kpb$is_flags #define kpb$v_valid kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_valid #define kpb$v_active kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_active #define kpb$v_vest kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_vest #define kpb$v_deleting kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_deleting #define kpb$v_sched kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_sched #define kpb$v_splock kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_splock #define kpb$v_debug kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_debug #define kpb$v_param kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_param #define kpb$v_dealloc_at_end kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_dealloc_at_end #define kpb$v_bypass_cache kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_bypass_cache #define kpb$v_hll_mask kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_hll_mask #define kpb$v_reserved_cache kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_reserved_cache #define kpb$v_save_fp kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_save_fp #define kpb$v_mem_stack_locked kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_mem_stack_locked #define kpb$v_rse_stack_locked kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_rse_stack_locked #define kpb$v_set_stack_limits kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_set_stack_limits #define kpb$v_tqe_wait kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_tqe_wait #define kpb$v_fork kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_fork #define kpb$v_fork_wait kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_fork_wait #define kpb$v_saved_dealloc_at_end kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_saved_dealloc_at_end #define kpb$v_spl_ctx kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_spl_ctx #define kpb$v_rsvd kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_rsvd #define kpb$v_acmode kpb$r_flags_overlay.kpb$r_fill_8_.kpb$r_fill_9_.kpb$v_acmode #define kpb$ps_saved_sp kpb$r_save_sp_overlay.kpb$ps_saved_sp #define kpb$pq_saved_sp kpb$r_save_sp_overlay.kpb$pq_saved_sp #define kpb$ps_stack_base kpb$r_stack_base_overlay.kpb$ps_stack_base #define kpb$pq_stack_base kpb$r_stack_base_overlay.kpb$pq_stack_base #define kpb$ps_stack_sp kpb$r_stack_sp_overlay.kpb$ps_stack_sp #define kpb$pq_stack_sp kpb$r_stack_sp_overlay.kpb$pq_stack_sp #define kpb$ps_fqfl kpb$r_sch_blocks.kpb$r_fkb.kpb$ps_fqfl #define kpb$ps_fqbl kpb$r_sch_blocks.kpb$r_fkb.kpb$ps_fqbl #define kpb$iw_fkb_size kpb$r_sch_blocks.kpb$r_fkb.kpb$iw_fkb_size #define kpb$ib_fkb_type kpb$r_sch_blocks.kpb$r_fkb.kpb$ib_fkb_type #define kpb$ib_flck kpb$r_sch_blocks.kpb$r_fkb.kpb$ib_flck #define kpb$ps_fpc kpb$r_sch_blocks.kpb$r_fkb.kpb$ps_fpc #define kpb$q_fr3 kpb$r_sch_blocks.kpb$r_fkb.kpb$q_fr3 #define kpb$q_fr4 kpb$r_sch_blocks.kpb$r_fkb.kpb$q_fr4 #define kpb$ps_tqfl kpb$r_sch_blocks.kpb$r_tqe.kpb$ps_tqfl #define kpb$ps_tqbl kpb$r_sch_blocks.kpb$r_tqe.kpb$ps_tqbl #define kpb$iw_tqe_size kpb$r_sch_blocks.kpb$r_tqe.kpb$iw_tqe_size #define kpb$ib_tqe_type kpb$r_sch_blocks.kpb$r_tqe.kpb$ib_tqe_type #define kpb$ib_rqtype kpb$r_sch_blocks.kpb$r_tqe.kpb$ib_rqtype #define kpb$ps_tqe_fpc kpb$r_sch_blocks.kpb$r_tqe.kpb$ps_tqe_fpc #define kpb$q_tqe_fr3 kpb$r_sch_blocks.kpb$r_tqe.kpb$q_tqe_fr3 #define kpb$q_tqe_fr4 kpb$r_sch_blocks.kpb$r_tqe.kpb$q_tqe_fr4 #define kpb$iq_time kpb$r_sch_blocks.kpb$r_tqe.kpb$iq_time #define kpb$ps_ucb kpb$r_vestprm.kpb$r_vestio.kpb$ps_ucb #define kpb$ps_irp kpb$r_vestprm.kpb$r_vestio.kpb$ps_irp #define kpb$is_timeout_time kpb$r_vestprm.kpb$r_vestio.kpb$r_iocblk.kpb$is_timeout_time #define kpb$is_restore_ipl kpb$r_vestprm.kpb$r_vestio.kpb$r_iocblk.kpb$is_restore_ipl #define kpb$is_channel_data kpb$r_vestprm.kpb$r_vestio.kpb$r_iocblk.kpb$is_channel_data #define kpb$ps_scsi_ptr1 kpb$r_vestprm.kpb$r_vestio.kpb$r_scsiblk.kpb$ps_scsi_ptr1 #define kpb$ps_scsi_ptr2 kpb$r_vestprm.kpb$r_vestio.kpb$r_scsiblk.kpb$ps_scsi_ptr2 #define kpb$ps_scsi_scdrp kpb$r_vestprm.kpb$r_vestio.kpb$r_scsiblk.kpb$ps_scsi_scdrp #define kpb$is_timeout kpb$r_vestprm.kpb$r_vestio.kpb$r_interruptblk.kpb$is_timeout #define kpb$is_newipl kpb$r_vestprm.kpb$r_vestio.kpb$r_interruptblk.kpb$is_newipl #define kpb$ps_dlck kpb$r_vestprm.kpb$r_vestio.kpb$r_interruptblk.kpb$ps_dlck #define kpb$ps_lkb kpb$r_vestprm.kpb$r_vestlmgr.kpb$ps_lkb #define kpb$l_ipl kpb$r_fill_10_.kpb$l_ipl #define kpb$b_ipl kpb$r_fill_10_.kpb$r_fill_11_.kpb$b_ipl #endif /* #if !defined(__VAXC) */ #define KPB$K_SPL_LENGTH 360 /* Length of KPB + SCH + SPL */ #define KPB$S_KPBDEF 360 /* Old size name, synonym for KPB$S_KPB */ #ifdef __INITIAL_POINTER_SIZE #pragma __required_pointer_size __save /* Save current pointer size */ #pragma __required_pointer_size __long /* Pointers are 64-bit */ typedef struct _kpb * KPB_PQ; /* Pointer to a KPB structure. */ typedef struct _kpb ** KPB_PPQ; /* Pointer to a pointer to a KPB structure. */ #pragma __required_pointer_size __restore /* Return to previous pointer size */ #else typedef unsigned __int64 KPB_PQ; typedef unsigned __int64 KPB_PPQ; #endif /* __INITIAL_POINTER_SIZE */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __KPBDEF_LOADED */