Changeset 25406 in vbox for trunk/src/VBox/Runtime/include
- Timestamp:
- Dec 15, 2009 2:23:53 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime/include/internal
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/strict.h
r25398 r25406 38 38 * Enables strictness checks and lock accounting of the RTCritSect API. 39 39 */ 40 #if defined(DOXYGEN_RUNNING) || (!defined(RTCRITSECT_STRICT) && (defined(RT_STRICT) || defined(RT_LOCK_STRICT)))40 #if defined(DOXYGEN_RUNNING) || (!defined(RTCRITSECT_STRICT) && defined(IN_RING3) && (defined(RT_STRICT) || defined(RT_LOCK_STRICT))) 41 41 # define RTCRITSECT_STRICT 42 42 #endif … … 46 46 # define RTCRITSECT_STRICT_POS_ARGS uId, RT_SRC_POS_ARGS 47 47 # define RTCRITSECT_STRICT_BLOCK(hThread, pRec, fRecursive) \ 48 RT ThreadBlockingDebug((hThread), RTTHREADSTATE_CRITSECT, fRecursive, pRec, uId, RT_SRC_POS_ARGS)48 RTLockValidatorCheckBlocking(pRec, (hThread), RTTHREADSTATE_CRITSECT, fRecursive, uId, RT_SRC_POS_ARGS) 49 49 #else 50 50 # define RTCRITSECT_STRICT_POS_DECL int iDummy … … 59 59 * Enables strictness checks and lock accounting of the RTSemMutex API. 60 60 */ 61 #if defined(DOXYGEN_RUNNING) || (!defined(RTSEMMUTEX_STRICT) && (defined(RT_STRICT) || defined(RT_LOCK_STRICT) || defined(RTSEM_STRICT)))61 #if defined(DOXYGEN_RUNNING) || (!defined(RTSEMMUTEX_STRICT) && defined(IN_RING3) && (defined(RT_STRICT) || defined(RT_LOCK_STRICT) || defined(RTSEM_STRICT))) 62 62 # define RTSEMMUTEX_STRICT 63 63 #endif … … 66 66 # define RTSEMMUTEX_STRICT_POS_DECL RTHCUINTPTR uId, RT_SRC_POS_DECL 67 67 # define RTSEMMUTEX_STRICT_POS_ARGS uId, RT_SRC_POS_ARGS 68 # define RTSEMMUTEX_STRICT_BLOCK(hThread, pRec) RT ThreadBlockingDebug((hThread), RTTHREADSTATE_MUTEX, true, pRec, uId, RT_SRC_POS_ARGS)68 # define RTSEMMUTEX_STRICT_BLOCK(hThread, pRec) RTLockValidatorCheckBlocking(pRec, (hThread), RTTHREADSTATE_MUTEX, true, uId, RT_SRC_POS_ARGS) 69 69 #else 70 70 # define RTSEMMUTEX_STRICT_POS_DECL int iDummy … … 78 78 * Enables strictness checks and lock accounting of the RTSemRW API. 79 79 */ 80 #if defined(DOXYGEN_RUNNING) || (!defined(RTSEMRW_STRICT) && (defined(RT_STRICT) || defined(RT_LOCK_STRICT) || defined(RTSEM_STRICT)))80 #if defined(DOXYGEN_RUNNING) || (!defined(RTSEMRW_STRICT) && defined(IN_RING3) && (defined(RT_STRICT) || defined(RT_LOCK_STRICT) || defined(RTSEM_STRICT))) 81 81 # define RTSEMRW_STRICT 82 82 #endif -
trunk/src/VBox/Runtime/include/internal/thread.h
r25368 r25406 39 39 # include <iprt/critsect.h> 40 40 #endif 41 #include "internal/lockvalidator.h" 41 42 #include "internal/magics.h" 42 43 … … 47 48 48 49 /** Max thread name length. */ 49 #define RTTHREAD_NAME_LEN 1650 #define RTTHREAD_NAME_LEN 16 50 51 #ifdef IPRT_WITH_GENERIC_TLS 51 52 /** The number of TLS entries for the generic implementation. */ 52 # define RTTHREAD_TLS_ENTRIES 6453 # define RTTHREAD_TLS_ENTRIES 64 53 54 #endif 54 55 … … 90 91 size_t cbStack; 91 92 #ifdef IN_RING3 92 /** What we're blocking on. */ 93 union RTTHREADINTBLOCKID 94 { 95 PRTLOCKVALIDATORREC pRec; 96 uint64_t u64; 97 } Block; 98 /** Where we're blocking. */ 99 const char volatile *pszBlockFunction; 100 /** Where we're blocking. */ 101 const char volatile *pszBlockFile; 102 /** Where we're blocking. */ 103 uint32_t volatile uBlockLine; 104 /** Where we're blocking. */ 105 RTHCUINTPTR volatile uBlockId; 106 /** Number of registered write locks, mutexes and critsects that this thread owns. */ 107 int32_t volatile cWriteLocks; 108 /** Number of registered read locks that this thread owns, nesting included. */ 109 int32_t volatile cReadLocks; 93 /** The lock validator data. */ 94 RTLOCKVALIDATORPERTHREAD LockValidator; 110 95 #endif /* IN_RING3 */ 111 96 #ifdef IPRT_WITH_GENERIC_TLS … … 209 194 #endif 210 195 196 /** 197 * Gets the thread state. 198 * 199 * @returns The thread state. 200 * @param pThread The thread. 201 */ 202 DECLINLINE(RTTHREADSTATE) rtThreadGetState(PRTTHREADINT pThread) 203 { 204 return pThread->enmState; 205 } 206 211 207 RT_C_DECLS_END 212 208
Note:
See TracChangeset
for help on using the changeset viewer.