Changeset 2551 in vbox for trunk/src/VBox
- Timestamp:
- May 9, 2007 12:05:52 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/TMAllCpu.cpp
r2469 r2551 42 42 DECLINLINE(uint64_t) tmCpuTickGetRawVirtual(PVM pVM, bool fCheckTimers) 43 43 { 44 uint64_t u64 = TMVirtualSyncGet (pVM/** @todo fCheckTimers */);44 uint64_t u64 = TMVirtualSyncGetEx(pVM, fCheckTimers); 45 45 if (u64 != TMCLOCK_FREQ_VIRTUAL) 46 46 u64 = ASMMultU64ByU32DivByU32(u64, pVM->tm.s.cTSCTicksPerSecond, TMCLOCK_FREQ_VIRTUAL); -
trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp
r2283 r2551 167 167 * @returns The timestamp. 168 168 * @param pVM VM handle. 169 * @param fCheckTimers Check timers or not 169 170 * @thread EMT. 170 171 */ 171 TMDECL(uint64_t) TMVirtualSyncGet (PVM pVM)172 TMDECL(uint64_t) TMVirtualSyncGetEx(PVM pVM, bool fCheckTimers) 172 173 { 173 174 VM_ASSERT_EMT(pVM); … … 183 184 Assert(pVM->tm.s.fVirtualTicking); 184 185 u64 = tmVirtualGetRaw(pVM); 185 if ( !VM_FF_ISSET(pVM, VM_FF_TIMER) 186 if ( fCheckTimers 187 && !VM_FF_ISSET(pVM, VM_FF_TIMER) 186 188 && pVM->tm.s.CTXALLSUFF(paTimerQueues)[TMCLOCK_VIRTUAL].u64Expire <= u64) 187 189 { … … 262 264 ASMAtomicXchgU64(&pVM->tm.s.u64VirtualSync, u64); 263 265 ASMAtomicXchgBool(&pVM->tm.s.fVirtualSyncTicking, false); 264 if (!VM_FF_ISSET(pVM, VM_FF_TIMER)) 266 if ( fCheckTimers 267 && !VM_FF_ISSET(pVM, VM_FF_TIMER)) 265 268 { 266 269 VM_FF_SET(pVM, VM_FF_TIMER); … … 283 286 284 287 /** 288 * Gets the current TMCLOCK_VIRTUAL_SYNC time. 289 * 290 * @returns The timestamp. 291 * @param pVM VM handle. 292 * @thread EMT. 293 */ 294 TMDECL(uint64_t) TMVirtualSyncGet(PVM pVM) 295 { 296 return TMVirtualSyncGetEx(pVM, true /* check timers */); 297 } 298 299 300 /** 285 301 * Gets the current lag of the synchronous virtual clock (relative to the virtual clock). 286 302 *
Note:
See TracChangeset
for help on using the changeset viewer.