TMAllCpu.cpp revision 10ecdac9fbdfe8d3a17e3debc35307f648e3f65b
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * TM - Timeout Manager, CPU Time, All Contexts.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * available from http://www.virtualbox.org. This file is free software;
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * you can redistribute it and/or modify it under the terms of the GNU
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * General Public License (GPL) as published by the Free Software
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * additional information or have any questions.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/*******************************************************************************
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync* Header Files *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync*******************************************************************************/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Gets the raw cpu tick from current virtual time.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncDECLINLINE(uint64_t) tmCpuTickGetRawVirtual(PVM pVM, bool fCheckTimers)
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync uint64_t u64 = TMVirtualSyncGetEx(pVM, fCheckTimers);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync u64 = ASMMultU64ByU32DivByU32(u64, pVM->tm.s.cTSCTicksPerSecond, TMCLOCK_FREQ_VIRTUAL);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Resumes the CPU timestamp counter ticking.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * @returns VBox status code.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * @param pVM The VM to operate on.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * @param pVCpu The VMCPU to operate on.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * @internal
return VINF_SUCCESS;
AssertFailed();
return VERR_INTERNAL_ERROR;
return VINF_SUCCESS;
AssertFailed();
return VERR_INTERNAL_ERROR;
return VINF_SUCCESS;
if (poffRealTSC)
else if (poffRealTSC)
*poffRealTSC = 0;
#ifdef VBOX_WITH_STATISTICS
return u64;
return VINF_SUCCESS;
return cTSCTicksPerSecond;