Changeset 25467 in vbox for trunk/src/VBox/Runtime/generic
- Timestamp:
- Dec 17, 2009 3:16:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/critsect-generic.cpp
r25409 r25467 244 244 ASMAtomicWriteHandle(&pCritSect->NativeThreadOwner, NativeThreadSelf); 245 245 #ifdef RTCRITSECT_STRICT 246 RTLockValidator WriteLockInc(RTLockValidatorSetOwner(pCritSect->pValidatorRec, ThreadSelf, uId, RT_SRC_POS_ARGS));246 RTLockValidatorSetOwner(pCritSect->pValidatorRec, ThreadSelf, uId, RT_SRC_POS_ARGS); 247 247 #endif 248 248 … … 321 321 for (;;) 322 322 { 323 RTCRITSECT_STRICT_BLOCK(hThreadSelf, pCritSect->pValidatorRec, !(pCritSect->fFlags & RTCRITSECT_FLAGS_NO_NESTING)); 323 #ifdef RTCRITSECT_STRICT 324 int rc9 = RTLockValidatorCheckBlocking(pCritSect->pValidatorRec, hThreadSelf, RTTHREADSTATE_CRITSECT, 325 !(pCritSect->fFlags & RTCRITSECT_FLAGS_NO_NESTING), 326 uId, RT_SRC_POS_ARGS); 327 if (RT_FAILURE(rc9)) 328 { 329 ASMAtomicDecS32(&pCritSect->cLockers); 330 return rc9; 331 } 332 #else 333 RTThreadBlocking(hThreadSelf, RTTHREADSTATE_CRITSECT); 334 #endif 335 324 336 int rc = RTSemEventWait(pCritSect->EventSem, RT_INDEFINITE_WAIT); 325 RTCRITSECT_STRICT_UNBLOCK(hThreadSelf); 337 338 RTThreadUnblocked(hThreadSelf, RTTHREADSTATE_CRITSECT); 326 339 if (pCritSect->u32Magic != RTCRITSECT_MAGIC) 327 340 return VERR_SEM_DESTROYED; … … 339 352 ASMAtomicWriteHandle(&pCritSect->NativeThreadOwner, NativeThreadSelf); 340 353 #ifdef RTCRITSECT_STRICT 341 RTLockValidator WriteLockInc(RTLockValidatorSetOwner(pCritSect->pValidatorRec, hThreadSelf, uId, RT_SRC_POS_ARGS));354 RTLockValidatorSetOwner(pCritSect->pValidatorRec, hThreadSelf, uId, RT_SRC_POS_ARGS); 342 355 #endif 343 356 … … 392 405 */ 393 406 #ifdef RTCRITSECT_STRICT 394 RTLockValidator WriteLockInc(RTLockValidatorUnsetOwner(pCritSect->pValidatorRec));407 RTLockValidatorUnsetOwner(pCritSect->pValidatorRec); 395 408 #endif 396 409 ASMAtomicWriteHandle(&pCritSect->NativeThreadOwner, NIL_RTNATIVETHREAD);
Note:
See TracChangeset
for help on using the changeset viewer.