Pyrogenesis  trunk
Functions | Variables
counter.cpp File Reference
#include "precompiled.h"
#include "lib/sysdep/os/win/whrt/counter.h"
#include "lib/alignment.h"
#include "lib/sysdep/cpu.h"
#include "lib/sysdep/os/win/whrt/tsc.h"
#include "lib/sysdep/os/win/whrt/hpet.h"
#include "lib/sysdep/os/win/whrt/pmt.h"
#include "lib/sysdep/os/win/whrt/qpc.h"
#include "lib/sysdep/os/win/whrt/tgt.h"
Include dependency graph for counter.cpp:

Functions

static ICounterConstructCounterAt (size_t id, void *address, size_t size)
 
ICounterCreateCounter (size_t id)
 
void DestroyCounter (ICounter *&counter)
 shut down the counter, free its resources and zero its pointer. More...
 

Variables

static volatile intptr_t isCounterAllocated
 

Function Documentation

static ICounter* ConstructCounterAt ( size_t  id,
void *  address,
size_t  size 
)
static
Parameters
id
address
sizeMaximum allowable size [bytes] of the subclass instance
Returns
pointer to a newly constructed ICounter subclass of type <id> at the given address, or 0 iff the ID is invalid.
ICounter* CreateCounter ( size_t  id)
Returns
a newly created ICounter of type <id> or 0 iff the ID is invalid.
Parameters
idinteger ID (0..N-1)

there can only be one active counter at a time; the previous one must have been destroyed before creating another!

void DestroyCounter ( ICounter *&  counter)

shut down the counter, free its resources and zero its pointer.

Variable Documentation

volatile intptr_t isCounterAllocated
static