Changeset 25409 in vbox
- Timestamp:
- Dec 15, 2009 3:04:41 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/lockvalidator.h
r25406 r25409 240 240 RTDECL(RTTHREAD) RTLockValidatorUnsetOwner(PRTLOCKVALIDATORREC pRec); 241 241 242 /** 243 * Gets the number of write locks and critical sections the specified 244 * thread owns. 245 * 246 * This number does not include any nested lock/critect entries. 247 * 248 * Note that it probably will return 0 for non-strict builds since 249 * release builds doesn't do unnecessary diagnostic counting like this. 250 * 251 * @returns Number of locks on success (0+) and VERR_INVALID_HANDLER on failure 252 * @param Thread The thread we're inquiring about. 253 * @remarks Will only work for strict builds. 254 */ 255 RTDECL(int32_t) RTLockValidatorWriteLockGetCount(RTTHREAD Thread); 256 257 /** 258 * Works the THREADINT::cWriteLocks member, mostly internal. 259 * 260 * @param Thread The current thread. 261 */ 262 RTDECL(void) RTLockValidatorWriteLockInc(RTTHREAD Thread); 263 264 /** 265 * Works the THREADINT::cWriteLocks member, mostly internal. 266 * 267 * @param Thread The current thread. 268 */ 269 RTDECL(void) RTLockValidatorWriteLockDec(RTTHREAD Thread); 270 271 /** 272 * Gets the number of read locks the specified thread owns. 273 * 274 * Note that nesting read lock entry will be included in the 275 * total sum. And that it probably will return 0 for non-strict 276 * builds since release builds doesn't do unnecessary diagnostic 277 * counting like this. 278 * 279 * @returns Number of read locks on success (0+) and VERR_INVALID_HANDLER on failure 280 * @param Thread The thread we're inquiring about. 281 */ 282 RTDECL(int32_t) RTLockValidatorReadLockGetCount(RTTHREAD Thread); 283 284 /** 285 * Works the THREADINT::cReadLocks member. 286 * 287 * @param Thread The current thread. 288 */ 289 RTDECL(void) RTLockValidatorReadLockInc(RTTHREAD Thread); 290 291 /** 292 * Works the THREADINT::cReadLocks member. 293 * 294 * @param Thread The current thread. 295 */ 296 RTDECL(void) RTLockValidatorReadLockDec(RTTHREAD Thread); 297 298 242 299 243 300 /*RTDECL(int) RTLockValidatorClassCreate();*/ -
trunk/include/iprt/thread.h
r25406 r25409 574 574 575 575 /** 576 * Gets the number of write locks and critical sections the specified577 * thread owns.578 *579 * This number does not include any nested lock/critect entries.580 *581 * Note that it probably will return 0 for non-strict builds since582 * release builds doesn't do unnecessary diagnostic counting like this.583 *584 * @returns Number of locks on success (0+) and VERR_INVALID_HANDLER on failure585 * @param Thread The thread we're inquiring about.586 * @remarks Will only work for strict builds.587 */588 RTDECL(int32_t) RTThreadGetWriteLockCount(RTTHREAD Thread);589 590 /**591 * Works the THREADINT::cWriteLocks member, mostly internal.592 *593 * @param Thread The current thread.594 */595 RTDECL(void) RTThreadWriteLockInc(RTTHREAD Thread);596 597 /**598 * Works the THREADINT::cWriteLocks member, mostly internal.599 *600 * @param Thread The current thread.601 */602 RTDECL(void) RTThreadWriteLockDec(RTTHREAD Thread);603 604 /**605 * Gets the number of read locks the specified thread owns.606 *607 * Note that nesting read lock entry will be included in the608 * total sum. And that it probably will return 0 for non-strict609 * builds since release builds doesn't do unnecessary diagnostic610 * counting like this.611 *612 * @returns Number of read locks on success (0+) and VERR_INVALID_HANDLER on failure613 * @param Thread The thread we're inquiring about.614 */615 RTDECL(int32_t) RTThreadGetReadLockCount(RTTHREAD Thread);616 617 /**618 * Works the THREADINT::cReadLocks member.619 *620 * @param Thread The current thread.621 */622 RTDECL(void) RTThreadReadLockInc(RTTHREAD Thread);623 624 /**625 * Works the THREADINT::cReadLocks member.626 *627 * @param Thread The current thread.628 */629 RTDECL(void) RTThreadReadLockDec(RTTHREAD Thread);630 631 /**632 576 * Unblocks a thread. 633 577 * -
trunk/src/VBox/Main/MachineImpl.cpp
r25357 r25409 60 60 #include <stdlib.h> 61 61 62 #include <iprt/asm.h> 62 63 #include <iprt/path.h> 63 64 #include <iprt/dir.h> 64 #include <iprt/asm.h> 65 #include <iprt/env.h> 66 #include <iprt/lockvalidator.h> 65 67 #include <iprt/process.h> 66 68 #include <iprt/cpp/utils.h> 67 #include <iprt/env.h>68 69 #include <iprt/string.h> 69 70 … … 9752 9753 9753 9754 /* No locks should be held at this point. */ 9754 AssertMsg (RT ThreadGetWriteLockCount (RTThreadSelf()) == 0, ("%d\n", RTThreadGetWriteLockCount (RTThreadSelf())));9755 AssertMsg (RT ThreadGetReadLockCount (RTThreadSelf()) == 0, ("%d\n", RTThreadGetReadLockCount (RTThreadSelf())));9755 AssertMsg (RTLockValidatorWriteLockGetCount (RTThreadSelf()) == 0, ("%d\n", RTLockValidatorWriteLockGetCount (RTThreadSelf()))); 9756 AssertMsg (RTLockValidatorReadLockGetCount (RTThreadSelf()) == 0, ("%d\n", RTLockValidatorReadLockGetCount (RTThreadSelf()))); 9756 9757 9757 9758 return directControl->OnUSBDeviceAttach (aDevice, aError, aMaskedIfs); … … 9784 9785 9785 9786 /* No locks should be held at this point. */ 9786 AssertMsg (RT ThreadGetWriteLockCount (RTThreadSelf()) == 0, ("%d\n", RTThreadGetWriteLockCount (RTThreadSelf())));9787 AssertMsg (RT ThreadGetReadLockCount (RTThreadSelf()) == 0, ("%d\n", RTThreadGetReadLockCount (RTThreadSelf())));9787 AssertMsg (RTLockValidatorWriteLockGetCount (RTThreadSelf()) == 0, ("%d\n", RTLockValidatorWriteLockGetCount (RTThreadSelf()))); 9788 AssertMsg (RTLockValidatorReadLockGetCount (RTThreadSelf()) == 0, ("%d\n", RTLockValidatorReadLockGetCount (RTThreadSelf()))); 9788 9789 9789 9790 return directControl->OnUSBDeviceDetach (aId, aError); -
trunk/src/VBox/Runtime/common/log/log.cpp
r24987 r25409 46 46 # include <iprt/env.h> 47 47 # include <iprt/file.h> 48 # include <iprt/lockvalidator.h> 48 49 # include <iprt/path.h> 49 50 #endif … … 412 413 if (Thread != NIL_RTTHREAD) 413 414 { 414 int32_t c = RT ThreadGetWriteLockCount(Thread);415 int32_t c = RTLockValidatorWriteLockGetCount(Thread); 415 416 RTSemSpinMutexRequest(pLogger->hSpinMtx); 416 c = RT ThreadGetWriteLockCount(Thread) - c;417 c = RTLockValidatorWriteLockGetCount(Thread) - c; 417 418 RTSemSpinMutexRelease(pLogger->hSpinMtx); 418 419 ASMAtomicWriteU32(&g_cLoggerLockCount, c); … … 2525 2526 if (Thread != NIL_RTTHREAD) 2526 2527 { 2527 uint32_t cReadLocks = RT ThreadGetReadLockCount(Thread);2528 uint32_t cWriteLocks = RT ThreadGetWriteLockCount(Thread) - g_cLoggerLockCount;2528 uint32_t cReadLocks = RTLockValidatorReadLockGetCount(Thread); 2529 uint32_t cWriteLocks = RTLockValidatorWriteLockGetCount(Thread) - g_cLoggerLockCount; 2529 2530 cReadLocks = RT_MIN(0xfff, cReadLocks); 2530 2531 cWriteLocks = RT_MIN(0xfff, cWriteLocks); -
trunk/src/VBox/Runtime/common/misc/lockvalidator.cpp
r25406 r25409 185 185 return hThread; 186 186 } 187 188 189 RTDECL(int32_t) RTLockValidatorWriteLockGetCount(RTTHREAD Thread) 190 { 191 if (Thread == NIL_RTTHREAD) 192 return 0; 193 194 PRTTHREADINT pThread = rtThreadGet(Thread); 195 if (!pThread) 196 return VERR_INVALID_HANDLE; 197 int32_t cWriteLocks = ASMAtomicReadS32(&pThread->LockValidator.cWriteLocks); 198 rtThreadRelease(pThread); 199 return cWriteLocks; 200 } 201 RT_EXPORT_SYMBOL(RTLockValidatorWriteLockGetCount); 202 203 204 RTDECL(void) RTLockValidatorWriteLockInc(RTTHREAD Thread) 205 { 206 PRTTHREADINT pThread = rtThreadGet(Thread); 207 AssertReturnVoid(pThread); 208 ASMAtomicIncS32(&pThread->LockValidator.cWriteLocks); 209 rtThreadRelease(pThread); 210 } 211 RT_EXPORT_SYMBOL(RTLockValidatorWriteLockInc); 212 213 214 RTDECL(void) RTLockValidatorWriteLockDec(RTTHREAD Thread) 215 { 216 PRTTHREADINT pThread = rtThreadGet(Thread); 217 AssertReturnVoid(pThread); 218 ASMAtomicDecS32(&pThread->LockValidator.cWriteLocks); 219 rtThreadRelease(pThread); 220 } 221 RT_EXPORT_SYMBOL(RTLockValidatorWriteLockDec); 222 223 224 RTDECL(int32_t) RTLockValidatorReadLockGetCount(RTTHREAD Thread) 225 { 226 if (Thread == NIL_RTTHREAD) 227 return 0; 228 229 PRTTHREADINT pThread = rtThreadGet(Thread); 230 if (!pThread) 231 return VERR_INVALID_HANDLE; 232 int32_t cReadLocks = ASMAtomicReadS32(&pThread->LockValidator.cReadLocks); 233 rtThreadRelease(pThread); 234 return cReadLocks; 235 } 236 RT_EXPORT_SYMBOL(RTLockValidatorReadLockGetCount); 237 238 239 RTDECL(void) RTLockValidatorReadLockInc(RTTHREAD Thread) 240 { 241 PRTTHREADINT pThread = rtThreadGet(Thread); 242 Assert(pThread); 243 ASMAtomicIncS32(&pThread->LockValidator.cReadLocks); 244 rtThreadRelease(pThread); 245 } 246 RT_EXPORT_SYMBOL(RTLockValidatorReadLockInc); 247 248 249 RTDECL(void) RTLockValidatorReadLockDec(RTTHREAD Thread) 250 { 251 PRTTHREADINT pThread = rtThreadGet(Thread); 252 Assert(pThread); 253 ASMAtomicDecS32(&pThread->LockValidator.cReadLocks); 254 rtThreadRelease(pThread); 255 } 256 RT_EXPORT_SYMBOL(RTLockValidatorReadLockDec); 257 187 258 188 259 … … 308 379 AssertPtrReturnVoid(pThread); 309 380 AssertReturnVoid(pThread->u32Magic == RTTHREADINT_MAGIC); 310 AssertReturnVoid(rtThreadGetState(pThread) == RTTHREADSTATE_RUNNING); 381 RTTHREADSTATE enmThreadState = rtThreadGetState(pThread); 382 AssertReturnVoid( enmThreadState == RTTHREADSTATE_RUNNING 383 || enmThreadState == RTTHREADSTATE_TERMINATED /* rtThreadRemove uses locks too */); 311 384 312 385 /* -
trunk/src/VBox/Runtime/common/misc/thread.cpp
r25406 r25409 1203 1203 RT_EXPORT_SYMBOL(RTThreadGetType); 1204 1204 1205 1206 1205 #ifdef IN_RING3 1207 1208 /**1209 * Gets the number of write locks and critical sections the specified1210 * thread owns.1211 *1212 * This number does not include any nested lock/critect entries.1213 *1214 * Note that it probably will return 0 for non-strict builds since1215 * release builds doesn't do unnecessary diagnostic counting like this.1216 *1217 * @returns Number of locks on success (0+) and VERR_INVALID_HANDLER on failure1218 * @param Thread The thread we're inquiring about.1219 *1220 * @todo Move this.1221 */1222 RTDECL(int32_t) RTThreadGetWriteLockCount(RTTHREAD Thread)1223 {1224 if (Thread == NIL_RTTHREAD)1225 return 0;1226 1227 PRTTHREADINT pThread = rtThreadGet(Thread);1228 if (!pThread)1229 return VERR_INVALID_HANDLE;1230 int32_t cWriteLocks = ASMAtomicReadS32(&pThread->LockValidator.cWriteLocks);1231 rtThreadRelease(pThread);1232 return cWriteLocks;1233 }1234 RT_EXPORT_SYMBOL(RTThreadGetWriteLockCount);1235 1236 1237 /**1238 * Works the THREADINT::cWriteLocks member, mostly internal.1239 *1240 * @param Thread The current thread.1241 *1242 * @todo Move this.1243 */1244 RTDECL(void) RTThreadWriteLockInc(RTTHREAD Thread)1245 {1246 PRTTHREADINT pThread = rtThreadGet(Thread);1247 AssertReturnVoid(pThread);1248 ASMAtomicIncS32(&pThread->LockValidator.cWriteLocks);1249 rtThreadRelease(pThread);1250 }1251 RT_EXPORT_SYMBOL(RTThreadWriteLockInc);1252 1253 1254 /**1255 * Works the THREADINT::cWriteLocks member, mostly internal.1256 *1257 * @param Thread The current thread.1258 *1259 * @todo Move this.1260 */1261 RTDECL(void) RTThreadWriteLockDec(RTTHREAD Thread)1262 {1263 PRTTHREADINT pThread = rtThreadGet(Thread);1264 AssertReturnVoid(pThread);1265 ASMAtomicDecS32(&pThread->LockValidator.cWriteLocks);1266 rtThreadRelease(pThread);1267 }1268 RT_EXPORT_SYMBOL(RTThreadWriteLockDec);1269 1270 1271 /**1272 * Gets the number of read locks the specified thread owns.1273 *1274 * Note that nesting read lock entry will be included in the1275 * total sum. And that it probably will return 0 for non-strict1276 * builds since release builds doesn't do unnecessary diagnostic1277 * counting like this.1278 *1279 * @returns Number of read locks on success (0+) and VERR_INVALID_HANDLER on failure1280 * @param Thread The thread we're inquiring about.1281 *1282 * @todo Move this.1283 */1284 RTDECL(int32_t) RTThreadGetReadLockCount(RTTHREAD Thread)1285 {1286 if (Thread == NIL_RTTHREAD)1287 return 0;1288 1289 PRTTHREADINT pThread = rtThreadGet(Thread);1290 if (!pThread)1291 return VERR_INVALID_HANDLE;1292 int32_t cReadLocks = ASMAtomicReadS32(&pThread->LockValidator.cReadLocks);1293 rtThreadRelease(pThread);1294 return cReadLocks;1295 }1296 RT_EXPORT_SYMBOL(RTThreadGetReadLockCount);1297 1298 1299 /**1300 * Works the THREADINT::cReadLocks member.1301 *1302 * @param Thread The current thread.1303 *1304 * @todo Move this.1305 */1306 RTDECL(void) RTThreadReadLockInc(RTTHREAD Thread)1307 {1308 PRTTHREADINT pThread = rtThreadGet(Thread);1309 Assert(pThread);1310 ASMAtomicIncS32(&pThread->LockValidator.cReadLocks);1311 rtThreadRelease(pThread);1312 }1313 RT_EXPORT_SYMBOL(RTThreadReadLockInc);1314 1315 1316 /**1317 * Works the THREADINT::cReadLocks member.1318 *1319 * @param Thread The current thread.1320 *1321 * @todo Move this.1322 */1323 RTDECL(void) RTThreadReadLockDec(RTTHREAD Thread)1324 {1325 PRTTHREADINT pThread = rtThreadGet(Thread);1326 Assert(pThread);1327 ASMAtomicDecS32(&pThread->LockValidator.cReadLocks);1328 rtThreadRelease(pThread);1329 }1330 RT_EXPORT_SYMBOL(RTThreadReadLockDec);1331 1332 1333 1334 1335 1206 1336 1207 /** -
trunk/src/VBox/Runtime/generic/critsect-generic.cpp
r25398 r25409 244 244 ASMAtomicWriteHandle(&pCritSect->NativeThreadOwner, NativeThreadSelf); 245 245 #ifdef RTCRITSECT_STRICT 246 RT ThreadWriteLockInc(RTLockValidatorSetOwner(pCritSect->pValidatorRec, ThreadSelf, uId, RT_SRC_POS_ARGS));246 RTLockValidatorWriteLockInc(RTLockValidatorSetOwner(pCritSect->pValidatorRec, ThreadSelf, uId, RT_SRC_POS_ARGS)); 247 247 #endif 248 248 … … 339 339 ASMAtomicWriteHandle(&pCritSect->NativeThreadOwner, NativeThreadSelf); 340 340 #ifdef RTCRITSECT_STRICT 341 RT ThreadWriteLockInc(RTLockValidatorSetOwner(pCritSect->pValidatorRec, hThreadSelf, uId, RT_SRC_POS_ARGS));341 RTLockValidatorWriteLockInc(RTLockValidatorSetOwner(pCritSect->pValidatorRec, hThreadSelf, uId, RT_SRC_POS_ARGS)); 342 342 #endif 343 343 … … 392 392 */ 393 393 #ifdef RTCRITSECT_STRICT 394 RT ThreadWriteLockInc(RTLockValidatorUnsetOwner(pCritSect->pValidatorRec));394 RTLockValidatorWriteLockInc(RTLockValidatorUnsetOwner(pCritSect->pValidatorRec)); 395 395 #endif 396 396 ASMAtomicWriteHandle(&pCritSect->NativeThreadOwner, NIL_RTNATIVETHREAD); -
trunk/src/VBox/Runtime/r3/linux/semmutex-linux.cpp
r25398 r25409 289 289 ASMAtomicWriteU32(&pThis->cNesting, 1); 290 290 #ifdef RTSEMMUTEX_STRICT 291 RT ThreadWriteLockInc(RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, RTSEMMUTEX_STRICT_POS_ARGS));291 RTLockValidatorWriteLockInc(RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, RTSEMMUTEX_STRICT_POS_ARGS)); 292 292 #endif 293 293 return VINF_SUCCESS; … … 373 373 */ 374 374 #ifdef RTSEMMUTEX_STRICT 375 RT ThreadWriteLockDec(RTLockValidatorUnsetOwner(&pThis->ValidatorRec));375 RTLockValidatorWriteLockDec(RTLockValidatorUnsetOwner(&pThis->ValidatorRec)); 376 376 #endif 377 377 pThis->Owner = (pthread_t)~0; -
trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
r25398 r25409 238 238 ASMAtomicWriteU32(&pThis->cNesting, 1); 239 239 #ifdef RTSEMMUTEX_STRICT 240 RT ThreadWriteLockInc(RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, RTSEMMUTEX_STRICT_POS_ARGS));240 RTLockValidatorWriteLockInc(RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, RTSEMMUTEX_STRICT_POS_ARGS)); 241 241 #endif 242 242 … … 321 321 */ 322 322 #ifdef RTSEMMUTEX_STRICT 323 RT ThreadWriteLockDec(RTLockValidatorUnsetOwner(&pThis->ValidatorRec));323 RTLockValidatorWriteLockDec(RTLockValidatorUnsetOwner(&pThis->ValidatorRec)); 324 324 #endif 325 325 pThis->Owner = (pthread_t)-1; -
trunk/src/VBox/Runtime/r3/posix/semrw-posix.cpp
r8653 r25409 33 33 *******************************************************************************/ 34 34 #include <iprt/semaphore.h> 35 #include "internal/iprt.h" 36 37 #include <iprt/asm.h> 35 38 #include <iprt/assert.h> 36 #include <iprt/alloc.h> 39 #include <iprt/err.h> 40 #include <iprt/lockvalidator.h> 41 #include <iprt/mem.h> 37 42 #include <iprt/thread.h> 38 #include <iprt/asm.h>39 #include <iprt/err.h>40 43 41 44 #include <errno.h> … … 185 188 #ifdef RTSEMRW_STRICT 186 189 if (ThreadSelf != NIL_RTTHREAD) 187 RT ThreadReadLockInc(ThreadSelf);190 RTLockValidatorReadLockInc(ThreadSelf); 188 191 #endif 189 192 return VINF_SUCCESS; … … 238 241 #ifdef RTSEMRW_STRICT 239 242 if (ThreadSelf != NIL_RTTHREAD) 240 RT ThreadReadLockInc(ThreadSelf);243 RTLockValidatorReadLockInc(ThreadSelf); 241 244 #endif 242 245 return VINF_SUCCESS; … … 278 281 #ifdef RTSEMRW_STRICT 279 282 if (ThreadSelf != NIL_RTTHREAD) 280 RT ThreadReadLockDec(ThreadSelf);283 RTLockValidatorReadLockDec(ThreadSelf); 281 284 #endif 282 285 return VINF_SUCCESS; … … 295 298 #ifdef RTSEMRW_STRICT 296 299 if (ThreadSelf != NIL_RTTHREAD) 297 RT ThreadReadLockDec(ThreadSelf);300 RTLockValidatorReadLockDec(ThreadSelf); 298 301 #endif 299 302 return VINF_SUCCESS; … … 375 378 RTTHREAD ThreadSelf = RTThreadSelf(); 376 379 if (ThreadSelf != NIL_RTTHREAD) 377 RT ThreadWriteLockInc(ThreadSelf);380 RTLockValidatorWriteLockInc(ThreadSelf); 378 381 #endif 379 382 return VINF_SUCCESS; … … 425 428 RTTHREAD ThreadSelf = RTThreadSelf(); 426 429 if (ThreadSelf != NIL_RTTHREAD) 427 RT ThreadWriteLockDec(ThreadSelf);430 RTLockValidatorWriteLockDec(ThreadSelf); 428 431 #endif 429 432 return VINF_SUCCESS; -
trunk/src/VBox/Runtime/r3/win/semmutex-win.cpp
r25398 r25409 171 171 case WAIT_OBJECT_0: 172 172 #ifdef RTSEMMUTEX_STRICT 173 RT ThreadWriteLockInc(RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, RTSEMMUTEX_STRICT_POS_ARGS));173 RTLockValidatorWriteLockInc(RTLockValidatorSetOwner(&pThis->ValidatorRec, hThreadSelf, RTSEMMUTEX_STRICT_POS_ARGS)); 174 174 #endif 175 175 return VINF_SUCCESS; … … 227 227 if ( pThis->ValidatorRec.hThread != NIL_RTTHREAD 228 228 && pThis->ValidatorRec.hThread == RTThreadSelf()) 229 RT ThreadWriteLockDec(RTLockValidatorUnsetOwner(&pThis->ValidatorRec));229 RTLockValidatorWriteLockDec(RTLockValidatorUnsetOwner(&pThis->ValidatorRec)); 230 230 else 231 231 AssertMsgFailed(("%p hThread=%RTthrd\n", pThis, pThis->ValidatorRec.hThread)); -
trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp
r25406 r25409 109 109 110 110 # ifdef PDMCRITSECT_STRICT 111 RT ThreadWriteLockInc(RTLockValidatorSetOwner(pCritSect->s.Core.pValidatorRec, NIL_RTTHREAD, PDMCRITSECT_STRICT_POS_ARGS));111 RTLockValidatorWriteLockInc(RTLockValidatorSetOwner(pCritSect->s.Core.pValidatorRec, NIL_RTTHREAD, PDMCRITSECT_STRICT_POS_ARGS)); 112 112 # endif 113 113 … … 403 403 && pCritSect->s.Core.pValidatorRec 404 404 && pCritSect->s.Core.pValidatorRec->hThread != NIL_RTTHREAD) 405 RT ThreadWriteLockDec(RTLockValidatorUnsetOwner(pCritSect->s.Core.pValidatorRec));405 RTLockValidatorWriteLockDec(RTLockValidatorUnsetOwner(pCritSect->s.Core.pValidatorRec)); 406 406 return rc; 407 407 } … … 449 449 # if defined(PDMCRITSECT_STRICT) 450 450 if (pCritSect->s.Core.pValidatorRec->hThread != NIL_RTTHREAD) 451 RT ThreadWriteLockDec(RTLockValidatorUnsetOwner(pCritSect->s.Core.pValidatorRec));451 RTLockValidatorWriteLockDec(RTLockValidatorUnsetOwner(pCritSect->s.Core.pValidatorRec)); 452 452 # endif 453 453 Assert(!pCritSect->s.Core.pValidatorRec || pCritSect->s.Core.pValidatorRec->hThread == NIL_RTTHREAD); -
trunk/src/recompiler/VBoxREMWrapper.cpp
r23019 r25409 1264 1264 { "RTThreadSelf", (void *)(uintptr_t)&RTThreadSelf, NULL, 0, REMFNDESC_FLAGS_RET_INT, sizeof(RTTHREAD), NULL }, 1265 1265 { "RTThreadNativeSelf", (void *)(uintptr_t)&RTThreadNativeSelf, NULL, 0, REMFNDESC_FLAGS_RET_INT, sizeof(RTNATIVETHREAD), NULL }, 1266 { "RT ThreadGetWriteLockCount", (void *)(uintptr_t)&RTThreadGetWriteLockCount, &g_aArgsThread[0],0, REMFNDESC_FLAGS_RET_INT, sizeof(int32_t), NULL },1266 { "RTLockValidatorWriteLockGetCount", (void *)(uintptr_t)&RTLockValidatorWriteLockGetCount, &g_aArgsThread[0], 0, REMFNDESC_FLAGS_RET_INT, sizeof(int32_t), NULL }, 1267 1267 }; 1268 1268
Note:
See TracChangeset
for help on using the changeset viewer.