/**/ /***************************************************************************/ /** **/ /** © 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:04 by OpenVMS SDL EV3-3 */ /* Source: 29-JUL-2005 13:32:25 $1$DGA7274:[LIB_H.SRC]MTXDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $MUTEXDEF ***/ #ifndef __MUTEXDEF_LOADED #define __MUTEXDEF_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 /*+ */ /* QUADWORD MUTEX DEFINITIONS */ /*- */ #include #define MUTEX$M_WRT 0x1 #define MUTEX$M_PRERLS_CBK 0x2 #define MUTEX$M_INTERLOCK 0x1 #define MUTEX$S_MUTEXDEF 8 /* Old size name, synonym for MUTEX$S_MUTEX */ #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 _mutex { #pragma __nomember_alignment __union { unsigned __int64 mutex$q_quadword; __struct { __union { unsigned short int mutex$w_sts; /* STATUS BITS */ __struct { /* Mutex status bit */ unsigned mutex$v_wrt : 1; /* WRITE PENDING OR IN PROGRESS */ unsigned mutex$v_prerls_cbk : 1; /* Pre release call back */ unsigned mutex$v_fill_0_ : 6; } mutex$r_mutex_sts_bits; __struct { /* Interlock access to mutex */ unsigned mutex$v_interlock : 1; /* INTERLOCK ACCESS TO MUTEX */ unsigned mutex$v_fill_1_ : 7; } mutex$r_mutex_sts_interlock; } mutex$r_fill_1; unsigned short int mutex$w_fill_2; /* FILL WORD */ unsigned int mutex$l_owncnt; /* OWNERSHIP COUNT */ } mutex$r_mutex_str; } mutex$r_fill_0; } MUTEX; #if !defined(__VAXC) #define mutex$q_quadword mutex$r_fill_0.mutex$q_quadword #define mutex$w_sts mutex$r_fill_0.mutex$r_mutex_str.mutex$r_fill_1.mutex$w_sts #define mutex$v_wrt mutex$r_fill_0.mutex$r_mutex_str.mutex$r_fill_1.mutex$r_mutex_sts_bits.mutex$v_wrt #define mutex$v_prerls_cbk mutex$r_fill_0.mutex$r_mutex_str.mutex$r_fill_1.mutex$r_mutex_sts_bits.mutex$v_prerls_cbk #define mutex$v_interlock mutex$r_fill_0.mutex$r_mutex_str.mutex$r_fill_1.mutex$r_mutex_sts_interlock.mutex$v_interlock #define mutex$l_owncnt mutex$r_fill_0.mutex$r_mutex_str.mutex$l_owncnt #endif /* #if !defined(__VAXC) */ #define MTXDBG$K_REV1 1 #define MTXDBG$K_REV2 2 #define MTXDBG$K_REVISION 2 #define MTXDBG$K_MUTEX 1 #define MTXDBG$K_INFO 2 #define MTXDBG$K_MAX_FLAG 2 #define MTXDBG$K_LOCKR 1 #define MTXDBG$K_LOCKW 2 #define MTXDBG$K_UNLOCK 3 #define MTXDBG$K_LOCKREXEC 4 #define MTXDBG$K_LOCKWEXEC 5 #define MTXDBG$K_UNLOCKEXEC 6 #define MTXDBG$K_LOCKR_QUAD 7 #define MTXDBG$K_LOCKW_QUAD 8 #define MTXDBG$K_UNLOCK_QUAD 9 #define MTXDBG$K_LOCKREXEC_QUAD 10 #define MTXDBG$K_LOCKWEXEC_QUAD 11 #define MTXDBG$K_UNLOCKEXEC_QUAD 12 #define MTXDBG$K_LOCKWNOWAIT 13 #define MTXDBG$K_LOCKWNOWAIT_QUAD 14 #define MTXDBG$K_LOCKR_WAIT 15 #define MTXDBG$K_LOCKW_WAIT 16 #define MTXDBG$K_UNLOCK_REL 17 #define MTXDBG$K_LOCKREXEC_INUSE 18 #define MTXDBG$K_LOCKWEXEC_INUSE 19 #define MTXDBG$K_UNLOCKEXEC_REL 20 #define MTXDBG$K_LOCKR_QUAD_WAIT 21 #define MTXDBG$K_LOCKW_QUAD_WAIT 22 #define MTXDBG$K_UNLOCK_QUAD_REL 23 #define MTXDBG$K_LOCKREXEC_QUAD_INUSE 24 #define MTXDBG$K_LOCKWEXEC_QUAD_INUSE 25 #define MTXDBG$K_UNLOCKEXEC_QUAD_REL 26 #define MTXDBG$K_LOCKWNOWAIT_INUSE 27 #define MTXDBG$K_LOCKWNOWAIT_QUAD_INUSE 28 #define MTXDBG$K_MAX_MODE 28 #define MTXDBG$M_MUTEX 0x1 #define MTXDBG$M_MUTEX_WAIT 0x2 #define MTXDBG$K_LENGTH 108 /* Structure size */ #define MTXDBG$C_LENGTH 108 /* Structure size */ #ifdef __cplusplus /* Define structure prototypes */ struct _mtxtrh; #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 _mtxdbg { #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ struct _mtxtrh *mtxdbg$q_trace_buffer; /* pointer to trace buffer */ #else unsigned __int64 mtxdbg$q_trace_buffer; #endif unsigned short int mtxdbg$w_mbo; /* must-be-one field */ unsigned char mtxdbg$b_type; /* Structure type */ unsigned char mtxdbg$b_subtype; /* and subtype */ unsigned int mtxdbg$l_revision; /* revision field */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __int64 mtxdbg$q_size; /* Size */ #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 int (*mtxdbg$l_start_trace)(); /* ptr to start trace routine */ int (*mtxdbg$l_stop_trace)(); /* ptr to stop trace routine */ void (*mtxdbg$l_trace_mutex)(); /* ptr to mutex trace routine */ void (*mtxdbg$l_trace_mutex_wait)(); /* ptr to mutex wait trace routine */ void (*mtxdbg$l_debug_print)(); __union { unsigned int mtxdbg$l_trace_flags; /* trace flags */ __struct { unsigned mtxdbg$v_mutex : 1; unsigned mtxdbg$v_mutex_wait : 1; unsigned mtxdbg$v_fill_2_ : 6; } mtxdbg$r_trace_flags_bits; } mtxdbg$r_trace_flags_overlay; unsigned int mtxdbg$l_mtx_flags; /* trace specific mutex */ int mtxdbg$l_cpu_flags; /* trace specific CPU */ unsigned int mtxdbg$l_trace_run; /* trace run index */ char mtxdbg$b_fill_3_ [4]; #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif unsigned __int64 mtxdbg$q_reserved1; #pragma __nomember_alignment unsigned __int64 mtxdbg$q_reserved2; unsigned __int64 mtxdbg$q_reserved3; unsigned __int64 mtxdbg$q_reserved4; unsigned __int64 *mtxdbg$pq_scc; /* pointer to array of cycle counts per possible CPU */ unsigned __int64 *mtxdbg$pq_systime; /* pointer to array of systime info per possible CPU */ int mtxdbg$l_max_cpus; char mtxdbg$b_fill_4_ [4]; } MTXDBG; #if !defined(__VAXC) #define mtxdbg$l_trace_flags mtxdbg$r_trace_flags_overlay.mtxdbg$l_trace_flags #define mtxdbg$v_mutex mtxdbg$r_trace_flags_overlay.mtxdbg$r_trace_flags_bits.mtxdbg$v_mutex #define mtxdbg$v_mutex_wait mtxdbg$r_trace_flags_overlay.mtxdbg$r_trace_flags_bits.mtxdbg$v_mutex_wait #endif /* #if !defined(__VAXC) */ #define MTXTRE$K_LENGTH 40 /* Structure size */ #ifdef __cplusplus /* Define structure prototypes */ struct _ktb; #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 _mtxtre { #pragma __nomember_alignment unsigned __int64 mtxtre$q_timestamp; /* timestamp in system cycle counts */ unsigned __int64 mtxtre$q_pc; /* callers PC */ unsigned int mtxtre$l_cpuid; /* current CPU id or address of CPU db */ unsigned int mtxtre$l_mode; /* general trace category */ unsigned int mtxtre$l_flag; /* which event was traced */ unsigned int mtxtre$l_mutex; /* address of mutex */ struct _pcb *mtxtre$l_pcb; /* current process during trace */ unsigned int mtxtre$l_spare1; } MTXTRE; #define MTXTRH$K_LENGTH 72 /* Structure size */ #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 _mtxtrh { #pragma __nomember_alignment int mtxtrh$l_idx; /* current index into trace buffer */ unsigned int mtxtrh$l_max_idx; /* maximum trace index */ unsigned short int mtxtrh$w_mbo; /* must-be-one field */ unsigned char mtxtrh$b_type; /* Structure type */ unsigned char mtxtrh$b_subtype; /* and subtype */ unsigned int mtxtrh$l_fill1; #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __int64 mtxtrh$q_size; /* Size */ #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __long /* And set ptr size default to 64-bit pointers */ struct _mtxtre *mtxtrh$q_entry_ptr; /* pointer to first trace entry */ #else unsigned __int64 mtxtrh$q_entry_ptr; #endif MTXTRE mtxtrh$r_entry [1]; /* array of trace entries */ } MTXTRH; #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 /* __MUTEXDEF_LOADED */