Changeset 13791 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Nov 4, 2008 4:12:57 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/HWACCMAll.cpp
r13025 r13791 142 142 } 143 143 144 #ifndef IN_GC 145 /** 146 * Returns the VMCPU id of the current EMT thread. 147 * 148 * @param pVM The VM to operate on. 149 */ 150 VMMDECL(RTCPUID) HWACCMGetVMCPUId(PVM pVM) 151 { 152 /* @todo */ 153 Assert(pVM->cCPUs == 1); 154 return 0; 155 } 156 #endif -
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 }
Note:
See TracChangeset
for help on using the changeset viewer.