aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver/Master.cpp
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-06-07 23:56:13 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-06-07 23:58:08 +0200
commit1d39db16b9e5250033eda16da3dabbb61d61e83a (patch)
tree8743d08e9ddcf800c904bccb2e8dd5ab2e80b1a6 /src/server/worldserver/Master.cpp
parent5fee5b012566191bfd0c27d3fcfc64aad6d657cb (diff)
Core/Misc: Kill Whitespace ...
Diffstat (limited to 'src/server/worldserver/Master.cpp')
-rw-r--r--src/server/worldserver/Master.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index c5424374f5a..6e4214603cb 100644
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -201,24 +201,24 @@ int Master::Run()
ACE_Based::Thread rarThread(new RARunnable);
#if defined(_WIN32) || defined(__linux__)
-
+
///- Handle affinity for multiple processors and process priority
uint32 affinity = sConfigMgr->GetIntDefault("UseProcessors", 0);
bool highPriority = sConfigMgr->GetBoolDefault("ProcessPriority", false);
#ifdef _WIN32 // Windows
-
+
HANDLE hProcess = GetCurrentProcess();
-
+
if (affinity > 0)
{
ULONG_PTR appAff;
ULONG_PTR sysAff;
-
+
if (GetProcessAffinityMask(hProcess, &appAff, &sysAff))
{
ULONG_PTR currentAffinity = affinity & appAff; // remove non accessible processors
-
+
if (!currentAffinity)
TC_LOG_ERROR("server.worldserver", "Processors marked in UseProcessors bitmask (hex) %x are not accessible for the worldserver. Accessible processors bitmask (hex): %x", affinity, appAff);
else if (SetProcessAffinityMask(hProcess, currentAffinity))
@@ -227,7 +227,7 @@ int Master::Run()
TC_LOG_ERROR("server.worldserver", "Can't set used processors (hex): %x", currentAffinity);
}
}
-
+
if (highPriority)
{
if (SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS))
@@ -235,9 +235,9 @@ int Master::Run()
else
TC_LOG_ERROR("server.worldserver", "Can't set worldserver process priority class.");
}
-
+
#else // Linux
-
+
if (affinity > 0)
{
cpu_set_t mask;
@@ -264,7 +264,7 @@ int Master::Run()
else
TC_LOG_INFO("server.worldserver", "worldserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));
}
-
+
#endif
#endif