Changeset 25614 in vbox for trunk/src/VBox/Runtime/r3/linux
- Timestamp:
- Jan 1, 2010 2:19:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/linux/semmutex-linux.cpp
r25607 r25614 176 176 AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, VERR_INVALID_HANDLE); 177 177 178 #ifdef RTSEMMUTEX_STRICT179 RTTHREAD hThreadSelf = RTThreadSelfAutoAdopt();180 RTLockValidatorCheckOrder(&pThis->ValidatorRec, hThreadSelf, pSrcPos);181 #endif182 183 178 /* 184 179 * Check if nested request. … … 188 183 && pThis->cNesting > 0) 189 184 { 185 #ifdef RTSEMMUTEX_STRICT 186 int rc9 = RTLockValidatorRecExclRecursion(&pThis->ValidatorRec, pSrcPos); 187 if (RT_FAILURE(rc9)) 188 return rc9; 189 #endif 190 190 ASMAtomicIncU32(&pThis->cNesting); 191 191 return VINF_SUCCESS; 192 192 } 193 #ifndef RTSEMMUTEX_STRICT 193 194 #ifdef RTSEMMUTEX_STRICT 195 RTTHREAD hThreadSelf = RTThreadSelfAutoAdopt(); 196 if (cMillies) 197 { 198 int rc9 = RTLockValidatorRecExclCheckOrder(&pThis->ValidatorRec, hThreadSelf, pSrcPos); 199 if (RT_FAILURE(rc9)) 200 return rc9; 201 } 202 #else 194 203 RTTHREAD hThreadSelf = RTThreadSelf(); 195 204 #endif … … 231 240 { 232 241 #ifdef RTSEMMUTEX_STRICT 233 int rc9 = RTLockValidatorCheckBlocking(&pThis->ValidatorRec, hThreadSelf, 234 RTTHREADSTATE_MUTEX, true, pSrcPos); 242 int rc9 = RTLockValidatorRecExclCheckBlocking(&pThis->ValidatorRec, hThreadSelf, pSrcPos, true); 235 243 if (RT_FAILURE(rc9)) 236 244 return rc9; … … 299 307 ASMAtomicWriteU32(&pThis->cNesting, 1); 300 308 #ifdef RTSEMMUTEX_STRICT 301 RTLockValidator SetOwner(&pThis->ValidatorRec, hThreadSelf, pSrcPos);309 RTLockValidatorRecExclSetOwner(&pThis->ValidatorRec, hThreadSelf, pSrcPos, true); 302 310 #endif 303 311 return VINF_SUCCESS; … … 354 362 AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, VERR_INVALID_HANDLE); 355 363 364 #ifdef RTSEMMUTEX_STRICT 365 int rc9 = RTLockValidatorRecExclReleaseOwner(&pThis->ValidatorRec, pThis->cNestings != 1); 366 if (RT_FAILURE(rc9)) 367 return rc9; 368 #endif 369 356 370 /* 357 371 * Check if nested. … … 378 392 * Clear the state. (cNesting == 1) 379 393 */ 380 #ifdef RTSEMMUTEX_STRICT381 RTLockValidatorUnsetOwner(&pThis->ValidatorRec);382 #endif383 394 pThis->Owner = (pthread_t)~0; 384 395 ASMAtomicWriteU32(&pThis->cNesting, 0);
Note:
See TracChangeset
for help on using the changeset viewer.