mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
refactored platform precompiler variable: TORQUE_OS_WIN{32,64,}
This commit is contained in:
parent
47a2cc165a
commit
6d8e0d7e25
31 changed files with 48 additions and 42 deletions
|
|
@ -53,7 +53,7 @@ EConfig CPUCount(U32& TotAvailLogical, U32& TotAvailCore, U32& PhysicalNum)
|
|||
#include <string.h>
|
||||
#include <sched.h>
|
||||
#define DWORD unsigned long
|
||||
#elif defined( TORQUE_OS_WIN32 )
|
||||
#elif defined( TORQUE_OS_WIN )
|
||||
#include <windows.h>
|
||||
#elif defined( TORQUE_OS_MAC )
|
||||
# include <sys/types.h>
|
||||
|
|
@ -476,7 +476,7 @@ next:
|
|||
if ( CPU_ISSET(i, &allowedCPUs) == 0 )
|
||||
return CONFIG_UserConfigIssue;
|
||||
}
|
||||
#elif defined( TORQUE_OS_WIN32 )
|
||||
#elif defined( TORQUE_OS_WIN )
|
||||
DWORD dwProcessAffinity, dwSystemAffinity;
|
||||
GetProcessAffinityMask(GetCurrentProcess(),
|
||||
&dwProcessAffinity,
|
||||
|
|
@ -504,7 +504,7 @@ next:
|
|||
if ( sched_setaffinity (0, sizeof(currentCPU), ¤tCPU) == 0 )
|
||||
{
|
||||
sleep(0); // Ensure system to switch to the right CPU
|
||||
#elif defined( TORQUE_OS_WIN32 )
|
||||
#elif defined( TORQUE_OS_WIN )
|
||||
while (dwAffinityMask && dwAffinityMask <= dwSystemAffinity)
|
||||
{
|
||||
if (SetThreadAffinityMask(GetCurrentThread(), dwAffinityMask))
|
||||
|
|
@ -549,7 +549,7 @@ next:
|
|||
#ifdef TORQUE_OS_LINUX
|
||||
sched_setaffinity (0, sizeof(allowedCPUs), &allowedCPUs);
|
||||
sleep(0);
|
||||
#elif defined( TORQUE_OS_WIN32 )
|
||||
#elif defined( TORQUE_OS_WIN )
|
||||
SetThreadAffinityMask(GetCurrentThread(), dwProcessAffinity);
|
||||
Sleep(0);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue