27 #include "precompiled.h"
99 static const size_t memSize = 200;
100 static u8 mem[memSize];
101 u8* alignedMem = (
u8*)Align<16>((uintptr_t)mem);
102 const size_t bytesLeft = mem+memSize - alignedMem;
ICounter * CreateCounterPMT(void *address, size_t size)
static ICounter * counter
ICounter * CreateCounterQPC(void *address, size_t size)
ICounter * CreateCounterHPET(void *address, size_t size)
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
static volatile intptr_t isCounterAllocated
virtual void Shutdown()=0
#define DEBUG_WARN_ERR(status)
display the error dialog with text corresponding to the given error code.
bool cpu_CAS(volatile intptr_t *location, intptr_t expected, intptr_t newValue)
atomic "compare and swap".
ICounter * CreateCounterTSC(void *address, size_t size)
void DestroyCounter(ICounter *&counter)
shut down the counter, free its resources and zero its pointer.
ICounter * CreateCounterTGT(void *address, size_t size)
static ICounter * ConstructCounterAt(size_t id, void *address, size_t size)
ICounter * CreateCounter(size_t id)