Files
0ad/source/lib/sysdep/win/wcpu.h
T
janwas ffdff6888d add NUMA and shared-L2-cache detect code (required at work)
enable most of IA-32 specific code to be used in amd64 (resides in
directory lib/sysdep/x86_x64)

bits: add IsBitSet
remove mem_PageSize (use os_cpu_PageSize instead)
cpuid: change interface to allow gracefully supporting later
subfunctions that require input parameters
amd64_asm.asm: add amd64 implementation of cpuid
cpu: move functions provided by OS to sysdep/os_cpu.cpp
cpu topology: avoid trouble when process affinity is set by remapping
processor numbers to 0..PopulationCount(processAffinity)
topology.cpp: move ex-ia32 topology code here.

This was SVN commit r5945.
2008-05-12 18:15:08 +00:00

26 lines
958 B
C

/**
* =========================================================================
* File : wcpu.h
* Project : 0 A.D.
* Description : Windows backend of os_cpu
* =========================================================================
*/
// license: GPL; see lib/license.txt
#ifndef INCLUDED_WCPU
#define INCLUDED_WCPU
#include "win.h"
// "affinity" and "processorNumber" are what Windows sees.
// "processorMask" and "processor" are the idealized representation we expose
// to users. the latter insulates them from process affinity restrictions by
// defining IDs as indices of the nonzero bits within the process affinity.
// these routines are provided for the benefit of wnuma.
extern DWORD_PTR wcpu_AffinityFromProcessorMask(DWORD_PTR processAffinity, uintptr_t processorMask);
extern uintptr_t wcpu_ProcessorMaskFromAffinity(DWORD_PTR processAffinity, DWORD_PTR affinity);
#endif // #ifndef INCLUDED_WCPU