Changeset 20089 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- May 27, 2009 2:53:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.