- Timestamp:
- May 27, 2009 2:53:47 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/TM.cpp
r20087 r20089 1377 1377 bool fActive = false; 1378 1378 bool fPending = false; 1379 1380 AssertMsg( !pTimer->pCritSect 1381 || VMR3GetState(pVM) != VMSTATE_RUNNING 1382 || PDMCritSectIsOwner(pTimer->pCritSect), ("%s\n", pTimer->pszDesc)); 1379 1383 1380 1384 /* … … 2326 2330 * 2327 2331 * In strict builds, ownership of the critical section will be asserted by 2328 * TMTimerSet and TMTimerStop. 2332 * TMTimerSet, TMTimerStop, TMTimerGetExpire and TMTimerDestroy (when called at 2333 * runtime). 2329 2334 * 2330 2335 * @retval VINF_SUCCESS on success. -
trunk/src/VBox/VMM/VMMAll/TMAll.cpp
r20050 r20089 42 42 #ifdef IN_RING3 43 43 # include <iprt/thread.h> 44 #endif 45 46 47 /******************************************************************************* 48 * Defined Constants And Macros * 49 *******************************************************************************/ 50 /** @def TMTIMER_ASSERT_CRITSECT 51 * Checks that the caller owns the critical section if one is associated with 52 * the timer. */ 53 #ifdef VBOX_STRICT 54 # define TMTIMER_ASSERT_CRITSECT(pTimer) \ 55 do { \ 56 if ((pTimer)->pCritSect) \ 57 { \ 58 PPDMCRITSECT pCritSect = (PPDMCRITSECT)MMHyperR3ToCC((pTimer)->CTX_SUFF(pVM), (pTimer)->pCritSect); \ 59 Assert(pCritSect && PDMCritSectIsOwner(pCritSect)); \ 60 } \ 61 } while (0) 62 #else 63 # define TMTIMER_ASSERT_CRITSECT(pTimer) do { } while (0) 44 64 #endif 45 65 … … 731 751 { 732 752 STAM_PROFILE_START(&pTimer->CTX_SUFF(pVM)->tm.s.CTXALLSUFF(StatTimerSet), a); 753 TMTIMER_ASSERT_CRITSECT(pTimer); 733 754 734 755 /** @todo find the most frequently used paths and make them skip tmSchedule and tmTimerTryWithLink. */ … … 942 963 { 943 964 STAM_PROFILE_START(&pTimer->CTX_SUFF(pVM)->tm.s.CTXALLSUFF(StatTimerStop), a); 965 TMTIMER_ASSERT_CRITSECT(pTimer); 966 944 967 /** @todo see if this function needs optimizing. */ 945 968 int cRetries = 1000; … … 1326 1349 VMMDECL(uint64_t) TMTimerGetExpire(PTMTIMER pTimer) 1327 1350 { 1351 TMTIMER_ASSERT_CRITSECT(pTimer); 1328 1352 int cRetries = 1000; 1329 1353 do
Note:
See TracChangeset
for help on using the changeset viewer.