Changeset 19740 in vbox
- Timestamp:
- May 15, 2009 2:32:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
r19720 r19740 78 78 pCritSect->s.Core.cNestings = 1; 79 79 Assert(pVCpu->hNativeThread != NIL_RTNATIVETHREAD); 80 ASMAtomic XchgSize(&pCritSect->s.Core.NativeThreadOwner, pVCpu->hNativeThread);80 ASMAtomicWriteHandle(&pCritSect->s.Core.NativeThreadOwner, pVCpu->hNativeThread); 81 81 STAM_PROFILE_ADV_START(&pCritSect->s.StatLocked, l); 82 82 return VINF_SUCCESS; … … 132 132 pCritSect->s.Core.cNestings = 1; 133 133 Assert(pVCpu->hNativeThread != NIL_RTNATIVETHREAD); 134 ASMAtomic XchgSize(&pCritSect->s.Core.NativeThreadOwner, pVCpu->hNativeThread);134 ASMAtomicWriteHandle(&pCritSect->s.Core.NativeThreadOwner, pVCpu->hNativeThread); 135 135 STAM_PROFILE_ADV_START(&pCritSect->s.StatLocked, l); 136 136 return VINF_SUCCESS; … … 176 176 { 177 177 RTThreadWriteLockDec(pCritSect->s.Core.Strict.ThreadOwner); 178 ASMAtomic XchgSize(&pCritSect->s.Core.Strict.ThreadOwner, NIL_RTTHREAD);178 ASMAtomicWriteHandle(&pCritSect->s.Core.Strict.ThreadOwner, NIL_RTTHREAD); 179 179 } 180 180 return rc; … … 244 244 { 245 245 STAM_PROFILE_ADV_STOP(&pCritSect->s.StatLocked, l); 246 ASMAtomic XchgSize(&pCritSect->s.Core.NativeThreadOwner, NIL_RTNATIVETHREAD);246 ASMAtomicWriteHandle(&pCritSect->s.Core.NativeThreadOwner, NIL_RTNATIVETHREAD); 247 247 if (ASMAtomicCmpXchgS32(&pCritSect->s.Core.cLockers, -1, 0)) 248 248 return; … … 250 250 /* darn, someone raced in on us. */ 251 251 Assert(pVCpu->hNativeThread); 252 ASMAtomic XchgSize(&pCritSect->s.Core.NativeThreadOwner, pVCpu->hNativeThread);252 ASMAtomicWriteHandle(&pCritSect->s.Core.NativeThreadOwner, pVCpu->hNativeThread); 253 253 STAM_PROFILE_ADV_START(&pCritSect->s.StatLocked, l); 254 254 } … … 324 324 325 325 /** 326 * Checks if somebody currently owns the critical section. 326 * Checks if somebody currently owns the critical section. 327 327 * Note: This doesn't prove that no deadlocks will occur later on; it's just a debugging tool 328 328 *
Note:
See TracChangeset
for help on using the changeset viewer.