Changeset 30328 in vbox
- Timestamp:
- Jun 21, 2010 12:55:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
r30325 r30328 91 91 92 92 ASMAtomicWriteS32(&pCritSect->s.Core.cNestings, 1); 93 Assert(pCritSect->s.Core.cNestings == 1); 93 94 ASMAtomicWriteHandle(&pCritSect->s.Core.NativeThreadOwner, hNativeSelf); 94 95 … … 171 172 { 172 173 Assert(pCritSect->s.Core.cNestings < 8); /* useful to catch incorrect locking */ 174 Assert(pCritSect->s.Core.cNestings >= 0); 173 175 174 176 /* … … 192 194 ASMAtomicIncS32(&pCritSect->s.Core.cLockers); 193 195 ASMAtomicIncS32(&pCritSect->s.Core.cNestings); 196 Assert(pCritSect->s.Core.cNestings > 1); 194 197 ASMAtomicAndU32(&pCritSect->s.Core.fFlags, ~PDMCRITSECT_FLAGS_PENDING_UNLOCK); 195 198 return VINF_SUCCESS; … … 313 316 ASMAtomicIncS32(&pCritSect->s.Core.cLockers); 314 317 ASMAtomicIncS32(&pCritSect->s.Core.cNestings); 318 Assert(pCritSect->s.Core.cNestings > 1); 315 319 ASMAtomicAndU32(&pCritSect->s.Core.fFlags, ~PDMCRITSECT_FLAGS_PENDING_UNLOCK); 316 320 return VINF_SUCCESS; … … 423 427 { 424 428 ASMAtomicDecS32(&pCritSect->s.Core.cNestings); 429 Assert(pCritSect->s.Core.cNestings >= 1); 425 430 ASMAtomicDecS32(&pCritSect->s.Core.cLockers); 426 431 return; … … 452 457 ASMAtomicWriteHandle(&pCritSect->s.Core.NativeThreadOwner, NIL_RTNATIVETHREAD); 453 458 ASMAtomicDecS32(&pCritSect->s.Core.cNestings); 459 Assert(pCritSect->s.Core.cNestings == 0); 454 460 455 461 /* stop and decrement lockers. */ … … 502 508 ASMAtomicWriteHandle(&pCritSect->s.Core.NativeThreadOwner, hNativeThread); 503 509 STAM_PROFILE_ADV_START(&pCritSect->s.StatLocked, l); 510 Assert(pCritSect->s.Core.cNestings == 0); 504 511 ASMAtomicWriteS32(&pCritSect->s.Core.cNestings, 1); 505 512 }
Note:
See TracChangeset
for help on using the changeset viewer.