Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

Internal
[The Time Manager API]


Detailed Description

For internal use only.


Classes

struct  TM
struct  TMCPU
struct  TMTIMER
struct  TMTIMERQUEUE

Defines

#define TM2VM(pTM)   ( (PVM)((char*)pTM - pTM->offVM) )
#define TM_ASSERT_LOCK(pVM)   Assert(PDMCritSectIsOwner(&pVM->tm.s.TimerCritSect))
#define TM_SET_STATE(pTimer, state)   ASMAtomicWriteU32((uint32_t volatile *)&(pTimer)->enmState, state)
#define TM_TRY_SET_STATE(pTimer, StateNew, StateOld, fRc)   (fRc) = ASMAtomicCmpXchgU32((uint32_t volatile *)&(pTimer)->enmState, StateNew, StateOld)
#define TMCLOCK_FREQ_REAL   UINT32_C(1000)
#define TMCLOCK_FREQ_VIRTUAL   UINT32_C(1000000000)
#define TMTIMER_GET_HEAD(pQueue)   ((PTMTIMER)((pQueue)->offActive ? (intptr_t)(pQueue) + (pQueue)->offActive : 0))
#define TMTIMER_GET_NEXT(pTimer)   ((PTMTIMER)((pTimer)->offNext ? (intptr_t)(pTimer) + (pTimer)->offNext : 0))
#define TMTIMER_GET_PREV(pTimer)   ((PTMTIMER)((pTimer)->offPrev ? (intptr_t)(pTimer) + (pTimer)->offPrev : 0))
#define TMTIMER_SET_HEAD(pQueue, pHead)   ((pQueue)->offActive = pHead ? (intptr_t)pHead - (intptr_t)(pQueue) : 0)
#define TMTIMER_SET_NEXT(pTimer, pNext)   ((pTimer)->offNext = (pNext) ? (intptr_t)(pNext) - (intptr_t)(pTimer) : 0)
#define TMTIMER_SET_PREV(pTimer, pPrev)   ((pTimer)->offPrev = (pPrev) ? (intptr_t)(pPrev) - (intptr_t)(pTimer) : 0)
#define TMTIMERSTATE_IS_PENDING_SCHEDULING(enmState)

Typedefs

typedef TMPTM
typedef TMCPUPTMCPU
typedef TMTIMERQUEUEPTMTIMERQUEUE

Enumerations

enum  TMTIMERSTATE {
  TMTIMERSTATE_STOPPED = 1, TMTIMERSTATE_ACTIVE, TMTIMERSTATE_EXPIRED_GET_UNLINK, TMTIMERSTATE_EXPIRED_DELIVER,
  TMTIMERSTATE_PENDING_STOP, TMTIMERSTATE_PENDING_STOP_SCHEDULE, TMTIMERSTATE_PENDING_SCHEDULE_SET_EXPIRE, TMTIMERSTATE_PENDING_SCHEDULE,
  TMTIMERSTATE_PENDING_RESCHEDULE_SET_EXPIRE, TMTIMERSTATE_PENDING_RESCHEDULE, TMTIMERSTATE_DESTROY, TMTIMERSTATE_FREE
}
enum  TMTIMERTYPE { TMTIMERTYPE_DEV = 1, TMTIMERTYPE_DRV, TMTIMERTYPE_INTERNAL, TMTIMERTYPE_EXTERNAL }

Functions

 AssertCompileMemberSize (TMTIMER, enmState, sizeof(uint32_t))
 DECLEXPORT (uint64_t) tmVirtualNanoTSRediscover(PRTTIMENANOTSDATA pData)
 DECLEXPORT (void) tmVirtualNanoTSBad(PRTTIMENANOTSDATA pData
int tmCpuTickPause (PVM pVM, PVMCPU pVCpu)
int tmCpuTickResume (PVM pVM, PVMCPU pVCpu)
int tmTimerLock (PVM pVM)
void tmTimerQueueSchedule (PVM pVM, PTMTIMERQUEUE pQueue)
const char * tmTimerState (TMTIMERSTATE enmState)
int tmTimerTryLock (PVM pVM)
void tmTimerUnlock (PVM pVM)
int tmVirtualPauseLocked (PVM pVM)
int tmVirtualResumeLocked (PVM pVM)
int tmVirtualSyncLock (PVM pVM)
int tmVirtualSyncTryLock (PVM pVM)
void tmVirtualSyncUnlock (PVM pVM)

Variables

uint64_t uint64_t u64DeltaPrev
uint64_t u64NanoTS
uint64_t uint64_t uint64_t u64PrevNanoTS


Generated by  Doxygen 1.6.0   Back to index