[7810] Moved ZThread related code on ACE framework. Author: Ambal
Remove ZThread source code from mangos. --HG-- branch : trunk
This commit is contained in:
@@ -155,7 +155,7 @@ bool ChatHandler::HandleCharacterDeleteCommand(const char* args)
|
||||
}
|
||||
|
||||
/// Exit the realm
|
||||
bool ChatHandler::HandleServerExitCommand(const char* args)
|
||||
bool ChatHandler::HandleServerExitCommand(const char* /*args*/)
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_EXIT);
|
||||
World::StopNow(SHUTDOWN_EXIT_CODE);
|
||||
@@ -163,7 +163,7 @@ bool ChatHandler::HandleServerExitCommand(const char* args)
|
||||
}
|
||||
|
||||
/// Display info on users currently in the realm
|
||||
bool ChatHandler::HandleAccountOnlineListCommand(const char* args)
|
||||
bool ChatHandler::HandleAccountOnlineListCommand(const char* /*args*/)
|
||||
{
|
||||
///- Get the list of accounts ID logged to the realm
|
||||
QueryResult *resultDB = CharacterDatabase.Query("SELECT name,account FROM characters WHERE online > 0");
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define __CLIRUNNABLE_H
|
||||
|
||||
/// Command Line Interface handling thread
|
||||
class CliRunnable : public ZThread::Runnable
|
||||
class CliRunnable : public ACE_Based::Runnable
|
||||
{
|
||||
public:
|
||||
void run();
|
||||
|
||||
@@ -35,8 +35,13 @@ trinity_worldd_SOURCES = \
|
||||
WorldRunnable.h
|
||||
|
||||
## Link world daemon against the shared library
|
||||
<<<<<<< HEAD:src/mangosd/Makefile.am
|
||||
trinity_worldd_LDADD = ../bindings/scripts/libtrinityscript.la ../game/libmangosgame.a ../shared/Database/libmangosdatabase.a ../shared/Config/libmangosconfig.a ../shared/Auth/libmangosauth.a ../shared/libmangosshared.a ../shared/vmap/libmangosvmaps.a ../framework/libmangosframework.a ../../dep/src/sockets/libmangossockets.a ../../dep/src/zthread/libZThread.la ../../dep/src/g3dlite/libg3dlite.a
|
||||
trinity_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/zthread -L../../dep/src/g3dlite -L../bindings/scripts/ -L$(libdir) $(TRINI_LIBS) -export-dynamic
|
||||
=======
|
||||
mangos_worldd_LDADD = ../bindings/universal/libmangosscript.la ../game/libmangosgame.a ../shared/Database/libmangosdatabase.a ../shared/Config/libmangosconfig.a ../shared/Auth/libmangosauth.a ../shared/libmangosshared.a ../shared/vmap/libmangosvmaps.a ../framework/libmangosframework.a ../../dep/src/sockets/libmangossockets.a ../../dep/src/g3dlite/libg3dlite.a
|
||||
mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/universal/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic
|
||||
>>>>>>> 00c7d15a78b1dcdbf888b768c55424183b2231e4:src/mangosd/Makefile.am
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
# Include world daemon configuration
|
||||
|
||||
+10
-10
@@ -60,7 +60,7 @@ INSTANTIATE_SINGLETON_1( Master );
|
||||
|
||||
volatile uint32 Master::m_masterLoopCounter = 0;
|
||||
|
||||
class FreezeDetectorRunnable : public ZThread::Runnable
|
||||
class FreezeDetectorRunnable : public ACE_Based::Runnable
|
||||
{
|
||||
public:
|
||||
FreezeDetectorRunnable() { _delaytime = 0; }
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
w_lastchange = 0;
|
||||
while(!World::IsStopped())
|
||||
{
|
||||
ZThread::Thread::sleep(1000);
|
||||
ACE_Based::Thread::Sleep(1000);
|
||||
uint32 curtime = getMSTime();
|
||||
//DEBUG_LOG("anti-freeze: time=%u, counters=[%u; %u]",curtime,Master::m_masterLoopCounter,World::m_worldLoopCounter);
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class RARunnable : public ZThread::Runnable
|
||||
class RARunnable : public ACE_Based::Runnable
|
||||
{
|
||||
public:
|
||||
uint32 numLoops, loopCounter;
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
{
|
||||
while (!World::IsStopped())
|
||||
{
|
||||
ZThread::Thread::sleep (static_cast<unsigned long> (socketSelecttime / 1000));
|
||||
ACE_Based::Thread::Sleep (static_cast<unsigned long> (socketSelecttime / 1000));
|
||||
checkping ();
|
||||
}
|
||||
}
|
||||
@@ -237,8 +237,8 @@ int Master::Run()
|
||||
_HookSignals();
|
||||
|
||||
///- Launch WorldRunnable thread
|
||||
ZThread::Thread t(new WorldRunnable);
|
||||
t.setPriority ((ZThread::Priority )2);
|
||||
ACE_Based::Thread t(*new WorldRunnable);
|
||||
t.setPriority ((ACE_Based::Priority )2);
|
||||
|
||||
// set server online
|
||||
LoginDatabase.PExecute("UPDATE realmlist SET color = 0, population = 0 WHERE id = '%d'",realmID);
|
||||
@@ -250,10 +250,10 @@ int Master::Run()
|
||||
#endif
|
||||
{
|
||||
///- Launch CliRunnable thread
|
||||
ZThread::Thread td1(new CliRunnable);
|
||||
ACE_Based::Thread td1(*new CliRunnable);
|
||||
}
|
||||
|
||||
ZThread::Thread td2(new RARunnable);
|
||||
ACE_Based::Thread td2(*new RARunnable);
|
||||
|
||||
///- Handle affinity for multiple processors and process priority on Windows
|
||||
#ifdef WIN32
|
||||
@@ -314,8 +314,8 @@ int Master::Run()
|
||||
{
|
||||
FreezeDetectorRunnable *fdr = new FreezeDetectorRunnable();
|
||||
fdr->SetDelayTime(freeze_delay*1000);
|
||||
ZThread::Thread t(fdr);
|
||||
t.setPriority(ZThread::High);
|
||||
ACE_Based::Thread t(*fdr);
|
||||
t.setPriority(ACE_Based::High);
|
||||
}
|
||||
|
||||
///- Launch the world listener socket
|
||||
|
||||
@@ -76,7 +76,7 @@ void WorldRunnable::run()
|
||||
if (diff <= WORLD_SLEEP_CONST+prevSleepTime)
|
||||
{
|
||||
prevSleepTime = WORLD_SLEEP_CONST+prevSleepTime-diff;
|
||||
ZThread::Thread::sleep(prevSleepTime);
|
||||
ACE_Based::Thread::Sleep(prevSleepTime);
|
||||
}
|
||||
else
|
||||
prevSleepTime = 0;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define __WORLDRUNNABLE_H
|
||||
|
||||
/// Heartbeat thread for the World
|
||||
class WorldRunnable : public ZThread::Runnable
|
||||
class WorldRunnable : public ACE_Based::Runnable
|
||||
{
|
||||
public:
|
||||
void run();
|
||||
|
||||
Reference in New Issue
Block a user