Changeset 87760 in vbox for trunk/src/VBox/VMM/VMMAll/TMAll.cpp
- Timestamp:
- Feb 15, 2021 10:45:27 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/TMAll.cpp
r87751 r87760 1109 1109 VMMDECL(PTMTIMERR3) TMTimerR3Ptr(PTMTIMER pTimer) 1110 1110 { 1111 #ifdef IN_RING0 1112 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1113 #endif 1111 1114 return (PTMTIMERR3)MMHyperCCToR3(pTimer->CTX_SUFF(pVM), pTimer); 1112 1115 } … … 1121 1124 VMMDECL(PTMTIMERR0) TMTimerR0Ptr(PTMTIMER pTimer) 1122 1125 { 1126 #ifdef IN_RING0 1127 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1128 #endif 1123 1129 return (PTMTIMERR0)MMHyperCCToR0(pTimer->CTX_SUFF(pVM), pTimer); 1124 1130 } … … 1133 1139 VMMDECL(PTMTIMERRC) TMTimerRCPtr(PTMTIMER pTimer) 1134 1140 { 1141 #ifdef IN_RING0 1142 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1143 #endif 1135 1144 return (PTMTIMERRC)MMHyperCCToRC(pTimer->CTX_SUFF(pVM), pTimer); 1136 1145 } … … 1152 1161 VMMDECL(int) TMTimerLock(PTMTIMER pTimer, int rcBusy) 1153 1162 { 1163 #ifdef IN_RING0 1164 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1165 #endif 1154 1166 AssertPtr(pTimer); 1155 1167 AssertReturn(pTimer->enmClock == TMCLOCK_VIRTUAL_SYNC, VERR_NOT_SUPPORTED); … … 1165 1177 VMMDECL(void) TMTimerUnlock(PTMTIMER pTimer) 1166 1178 { 1179 #ifdef IN_RING0 1180 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1181 #endif 1167 1182 AssertPtr(pTimer); 1168 1183 AssertReturnVoid(pTimer->enmClock == TMCLOCK_VIRTUAL_SYNC); … … 1179 1194 VMMDECL(bool) TMTimerIsLockOwner(PTMTIMER pTimer) 1180 1195 { 1196 #ifdef IN_RING0 1197 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1198 #endif 1181 1199 AssertPtr(pTimer); 1182 1200 AssertReturn(pTimer->enmClock == TMCLOCK_VIRTUAL_SYNC, false); … … 1306 1324 VMMDECL(int) TMTimerSet(PTMTIMER pTimer, uint64_t u64Expire) 1307 1325 { 1326 #ifdef IN_RING0 1327 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1328 #endif 1308 1329 PVMCC pVM = pTimer->CTX_SUFF(pVM); 1309 1330 STAM_COUNTER_INC(&pTimer->StatSetAbsolute); … … 1613 1634 VMMDECL(int) TMTimerSetRelative(PTMTIMER pTimer, uint64_t cTicksToNext, uint64_t *pu64Now) 1614 1635 { 1636 #ifdef IN_RING0 1637 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1638 #endif 1615 1639 PVMCC pVM = pTimer->CTX_SUFF(pVM); 1616 1640 STAM_COUNTER_INC(&pTimer->StatSetRelative); … … 1841 1865 VMMDECL(int) TMTimerSetFrequencyHint(PTMTIMER pTimer, uint32_t uHzHint) 1842 1866 { 1867 #ifdef IN_RING0 1868 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1869 #endif 1843 1870 TMTIMER_ASSERT_CRITSECT(pTimer); 1844 1871 … … 1936 1963 VMMDECL(int) TMTimerStop(PTMTIMER pTimer) 1937 1964 { 1965 #ifdef IN_RING0 1966 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 1967 #endif 1938 1968 PVMCC pVM = pTimer->CTX_SUFF(pVM); 1939 1969 STAM_COUNTER_INC(&pTimer->StatStop); … … 2044 2074 VMMDECL(uint64_t) TMTimerGet(PTMTIMER pTimer) 2045 2075 { 2076 #ifdef IN_RING0 2077 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2078 #endif 2046 2079 PVMCC pVM = pTimer->CTX_SUFF(pVM); 2047 2080 STAM_COUNTER_INC(&pTimer->StatGet); … … 2077 2110 VMMDECL(uint64_t) TMTimerGetFreq(PTMTIMER pTimer) 2078 2111 { 2112 #ifdef IN_RING0 2113 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2114 #endif 2079 2115 switch (pTimer->enmClock) 2080 2116 { … … 2102 2138 VMMDECL(uint64_t) TMTimerGetExpire(PTMTIMER pTimer) 2103 2139 { 2140 #ifdef IN_RING0 2141 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2142 #endif 2104 2143 TMTIMER_ASSERT_CRITSECT(pTimer); 2105 2144 int cRetries = 1000; … … 2164 2203 VMMDECL(bool) TMTimerIsActive(PTMTIMER pTimer) 2165 2204 { 2205 #ifdef IN_RING0 2206 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2207 #endif 2166 2208 TMTIMERSTATE enmState = pTimer->enmState; 2167 2209 switch (enmState) … … 2341 2383 VMMDECL(uint64_t) TMTimerToNano(PTMTIMER pTimer, uint64_t u64Ticks) 2342 2384 { 2385 #ifdef IN_RING0 2386 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2387 #endif 2343 2388 switch (pTimer->enmClock) 2344 2389 { … … 2370 2415 VMMDECL(uint64_t) TMTimerToMicro(PTMTIMER pTimer, uint64_t u64Ticks) 2371 2416 { 2417 #ifdef IN_RING0 2418 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2419 #endif 2372 2420 switch (pTimer->enmClock) 2373 2421 { … … 2399 2447 VMMDECL(uint64_t) TMTimerToMilli(PTMTIMER pTimer, uint64_t u64Ticks) 2400 2448 { 2449 #ifdef IN_RING0 2450 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2451 #endif 2401 2452 switch (pTimer->enmClock) 2402 2453 { … … 2427 2478 VMMDECL(uint64_t) TMTimerFromNano(PTMTIMER pTimer, uint64_t cNanoSecs) 2428 2479 { 2480 #ifdef IN_RING0 2481 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2482 #endif 2429 2483 switch (pTimer->enmClock) 2430 2484 { … … 2455 2509 VMMDECL(uint64_t) TMTimerFromMicro(PTMTIMER pTimer, uint64_t cMicroSecs) 2456 2510 { 2511 #ifdef IN_RING0 2512 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2513 #endif 2457 2514 switch (pTimer->enmClock) 2458 2515 { … … 2483 2540 VMMDECL(uint64_t) TMTimerFromMilli(PTMTIMER pTimer, uint64_t cMilliSecs) 2484 2541 { 2542 #ifdef IN_RING0 2543 Assert(pTimer->fFlags & TMTIMER_FLAGS_RING0); 2544 #endif 2485 2545 switch (pTimer->enmClock) 2486 2546 {
Note:
See TracChangeset
for help on using the changeset viewer.