mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-12 08:14:22 +00:00
ffdff6888d
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.
26 lines
958 B
C
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
|