1
0
forked from 0ad/0ad

more minor fixes. rename uname.machine to x64 (less confusing than amd64)

This was SVN commit r10827.
This commit is contained in:
janwas 2011-12-29 09:47:42 +00:00
parent 23308f0259
commit 78ba79209d
5 changed files with 7 additions and 5 deletions

View File

@ -107,7 +107,7 @@ public:
// allocate uninitialized storage
pointer allocate(size_type numElements)
{
const size_type alignment = x86_x64::Caches(L1D)->entrySize;
const size_type alignment = x86_x64::Caches(x86_x64::L1D)->entrySize;
const size_type elementSize = round_up(sizeof(T), alignment);
const size_type size = numElements * elementSize;
pointer p = (pointer)rtl_AllocateAligned(size, alignment);

View File

@ -111,7 +111,7 @@ bool AreApicIdsReliable()
}
static size_t IndexFromApicId(const ApicId* apicIds, size_t apicId)
static size_t IndexFromApicId(const ApicId* apicIds, ApicId apicId)
{
ModuleInit(&apicInitState, InitApicIds);

View File

@ -33,7 +33,7 @@ typedef u8 ApicId; // not necessarily contiguous values
* feasible - mahaf_MapPhysicalMemory only works reliably on WinXP. we also
* don't want to interfere with the OS's constant use of the APIC registers.
**/
LIB_API u8 GetApicId();
LIB_API ApicId GetApicId();
// if this returns false, apicId = contiguousId = processor.
// otherwise, there are unspecified but bijective mappings between

View File

@ -27,8 +27,10 @@
#include "precompiled.h"
#include "lib/sysdep/gfx.h"
#define WSDL_NO_KEYSYM
#include "lib/external_libraries/sdl.h"
#include "lib/ogl.h"
#if OS_WIN
# include "lib/sysdep/os/win/wgfx.h"
#endif

View File

@ -57,9 +57,9 @@ int uname(struct utsname* un)
SYSTEM_INFO si;
GetSystemInfo(&si);
if(si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
strcpy_s(un->machine, ARRAY_SIZE(un->machine), "AMD64");
strcpy_s(un->machine, ARRAY_SIZE(un->machine), "x64");
else
strcpy_s(un->machine, ARRAY_SIZE(un->machine), "IA-32");
strcpy_s(un->machine, ARRAY_SIZE(un->machine), "x86");
return 0;
}