00001 #ifndef mutexdef_h 00002 #define mutexdef_h 00003 00004 #include <cpudef.h> 00005 00006 #define MUTEX_M_WRT 0x1 00007 #define MUTEX_M_INTERLOCK 0x1 00008 #define MUTEX_S_MUTEXDEF 8 00009 00010 struct _mutex { 00011 union { 00012 unsigned short int mutex_w_sts; 00013 unsigned mutex_v_wrt : 1; 00014 unsigned mutex_v_interlock : 1; 00015 }; 00016 unsigned short int mutex_w_fill_2; 00017 unsigned int mutex_l_owncnt; 00018 }; 00019 00020 #define MTXDBG_K_REV1 1 00021 #define MTXDBG_K_REV2 2 00022 #define MTXDBG_K_REVISION 2 00023 #define MTXDBG_K_MUTEX 1 00024 #define MTXDBG_K_INFO 2 00025 #define MTXDBG_K_MAX_FLAG 2 00026 #define MTXDBG_K_LOCKR 1 00027 #define MTXDBG_K_LOCKW 2 00028 #define MTXDBG_K_UNLOCK 3 00029 #define MTXDBG_K_LOCKREXEC 4 00030 #define MTXDBG_K_LOCKWEXEC 5 00031 #define MTXDBG_K_UNLOCKEXEC 6 00032 #define MTXDBG_K_LOCKR_QUAD 7 00033 #define MTXDBG_K_LOCKW_QUAD 8 00034 #define MTXDBG_K_UNLOCK_QUAD 9 00035 #define MTXDBG_K_LOCKREXEC_QUAD 10 00036 #define MTXDBG_K_LOCKWEXEC_QUAD 11 00037 #define MTXDBG_K_UNLOCKEXEC_QUAD 12 00038 #define MTXDBG_K_LOCKWNOWAIT 13 00039 #define MTXDBG_K_LOCKWNOWAIT_QUAD 14 00040 #define MTXDBG_K_LOCKR_WAIT 15 00041 #define MTXDBG_K_LOCKW_WAIT 16 00042 #define MTXDBG_K_UNLOCK_REL 17 00043 #define MTXDBG_K_LOCKREXEC_INUSE 18 00044 #define MTXDBG_K_LOCKWEXEC_INUSE 19 00045 #define MTXDBG_K_UNLOCKEXEC_REL 20 00046 #define MTXDBG_K_LOCKR_QUAD_WAIT 21 00047 #define MTXDBG_K_LOCKW_QUAD_WAIT 22 00048 #define MTXDBG_K_UNLOCK_QUAD_REL 23 00049 #define MTXDBG_K_LOCKREXEC_QUAD_INUSE 24 00050 #define MTXDBG_K_LOCKWEXEC_QUAD_INUSE 25 00051 #define MTXDBG_K_UNLOCKEXEC_QUAD_REL 26 00052 #define MTXDBG_K_MAX_MODE 26 00053 #define MTXDBG_M_MUTEX 0x1 00054 #define MTXDBG_M_MUTEX_WAIT 0x2 00055 #define MTXDBG_K_LENGTH 608 00056 #define MTXDBG_C_LENGTH 608 00057 00058 struct _mtxdbg { 00059 struct _mtxtrh *mtxdbg_q_trace_buffer; 00060 unsigned short int mtxdbg_w_mbo; 00061 unsigned char mtxdbg_b_type; 00062 unsigned char mtxdbg_b_subtype; 00063 unsigned int mtxdbg_l_revision; 00064 long long mtxdbg_q_size; 00065 int (*mtxdbg_l_start_trace)(); 00066 int (*mtxdbg_l_stop_trace)(); 00067 void (*mtxdbg_l_trace_mutex)(); 00068 void (*mtxdbg_l_trace_mutex_wait)(); 00069 void (*mtxdbg_l_debug_print)(); 00070 union { 00071 unsigned int mtxdbg_l_trace_flags; 00072 struct { 00073 unsigned mtxdbg_v_mutex : 1; 00074 unsigned mtxdbg_v_mutex_wait : 1; 00075 unsigned mtxdbg_v_fill_0_ : 6; 00076 }; 00077 }; 00078 unsigned int mtxdbg_l_mtx_flags; 00079 int mtxdbg_l_cpu_flags; 00080 unsigned int mtxdbg_l_trace_run; 00081 char mtxdbg_b_fill_1_ [4]; 00082 unsigned long long mtxdbg_q_reserved1; 00083 unsigned long long mtxdbg_q_reserved2; 00084 unsigned long long mtxdbg_q_reserved3; 00085 unsigned long long mtxdbg_q_reserved4; 00086 unsigned long long mtxdbg_q_scc [32]; 00087 unsigned long long mtxdbg_q_systime [32]; 00088 }; 00089 00090 #define MTXTRE_K_LENGTH 32 00091 00092 struct _mtxtre { 00093 unsigned long long mtxtre_q_timestamp; 00094 unsigned int mtxtre_l_pc; 00095 unsigned int mtxtre_l_cpuid; 00096 unsigned int mtxtre_l_mode; 00097 unsigned int mtxtre_l_flag; 00098 unsigned int mtxtre_l_mutex; 00099 struct _pcb *mtxtre_l_pcb; 00100 }; 00101 #define MTXTRH_K_LENGTH 64 00102 00103 struct _mtxtrh { 00104 int mtxtrh_l_idx; 00105 unsigned int mtxtrh_l_max_idx; 00106 unsigned short int mtxtrh_w_mbo; 00107 unsigned char mtxtrh_b_type; 00108 unsigned char mtxtrh_b_subtype; 00109 unsigned int mtxtrh_l_fill1; 00110 long long mtxtrh_q_size; 00111 struct _mtxtre *mtxtrh_q_entry_ptr; 00112 struct _mtxtre mtxtrh_r_entry [1]; 00113 }; 00114 00115 #endif 00116 00117