- 時間撮記:
- 2008-11-4 下午04:12:57 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
r12989 r13791 30 30 #include <VBox/vm.h> 31 31 #include <VBox/err.h> 32 #include <VBox/hwaccm.h> 32 33 33 34 #include <VBox/log.h> … … 67 68 Assert(pVM); 68 69 69 /* 70 * Try take the lock. 70 RTCPUID idCPU = VM_GET_VMCPUID(pVM); 71 72 /* 73 * Try to take the lock. 71 74 */ 72 75 if (ASMAtomicCmpXchgS32(&pCritSect->s.Core.cLockers, 0, -1)) 73 76 { 74 77 pCritSect->s.Core.cNestings = 1; 75 ASMAtomicXchgSize(&pCritSect->s.Core.NativeThreadOwner, pVM->NativeThreadEMT); 78 Assert(pVM->aCpu[idCPU].hNativeThread); 79 ASMAtomicXchgSize(&pCritSect->s.Core.NativeThreadOwner, pVM->aCpu[idCPU].hNativeThread); 76 80 STAM_PROFILE_ADV_START(&pCritSect->s.StatLocked, l); 77 81 return VINF_SUCCESS; … … 81 85 * Nested? 82 86 */ 83 if (pCritSect->s.Core.NativeThreadOwner == pVM-> NativeThreadEMT)87 if (pCritSect->s.Core.NativeThreadOwner == pVM->aCpu[idCPU].hNativeThread) 84 88 { 85 89 pCritSect->s.Core.cNestings++; … … 159 163 PVM pVM = pCritSect->s.CTX_SUFF(pVM); 160 164 Assert(pVM); 161 Assert (pCritSect->s.Core.NativeThreadOwner == pVM->NativeThreadEMT);165 AssertMsg(pCritSect->s.Core.NativeThreadOwner == pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread, ("Owner %RX64 emt=%RX64\n", pCritSect->s.Core.NativeThreadOwner, pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread)); 162 166 163 167 /* … … 183 187 184 188 /* darn, someone raced in on us. */ 185 ASMAtomicXchgSize(&pCritSect->s.Core.NativeThreadOwner, pVM->NativeThreadEMT); 189 Assert(pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread); 190 ASMAtomicXchgSize(&pCritSect->s.Core.NativeThreadOwner, pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread); 186 191 STAM_PROFILE_ADV_START(&pCritSect->s.StatLocked, l); 187 192 } … … 217 222 PVM pVM = pCritSect->s.CTX_SUFF(pVM); 218 223 Assert(pVM); 219 return pCritSect->s.Core.NativeThreadOwner == pVM-> NativeThreadEMT;224 return pCritSect->s.Core.NativeThreadOwner == pVM->aCpu[VM_GET_VMCPUID(pVM)].hNativeThread; 220 225 #endif 221 226 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器