aboutsummaryrefslogtreecommitdiff
path: root/src/trinitycore
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-13 18:22:21 -0500
committermegamage <none@none>2009-05-13 18:22:21 -0500
commit25e5c99dec793dfcc45a41873af1760392ee8844 (patch)
treef79107e9d93dc351f5b4f7b05924eed793f067d3 /src/trinitycore
parent9dd5a1c6d7a6656b8ec71ff33659acd2294633ad (diff)
[7810] Moved ZThread related code on ACE framework. Author: Ambal
Remove ZThread source code from mangos. --HG-- branch : trunk
Diffstat (limited to 'src/trinitycore')
-rw-r--r--src/trinitycore/CliRunnable.cpp4
-rw-r--r--src/trinitycore/CliRunnable.h2
-rw-r--r--src/trinitycore/Makefile.am5
-rw-r--r--src/trinitycore/Master.cpp20
-rw-r--r--src/trinitycore/WorldRunnable.cpp2
-rw-r--r--src/trinitycore/WorldRunnable.h2
6 files changed, 20 insertions, 15 deletions
diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp
index 91f37cd1b48..d53ee8c24be 100644
--- a/src/trinitycore/CliRunnable.cpp
+++ b/src/trinitycore/CliRunnable.cpp
@@ -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");
diff --git a/src/trinitycore/CliRunnable.h b/src/trinitycore/CliRunnable.h
index 20ff58f27ba..cf745bbb195 100644
--- a/src/trinitycore/CliRunnable.h
+++ b/src/trinitycore/CliRunnable.h
@@ -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();
diff --git a/src/trinitycore/Makefile.am b/src/trinitycore/Makefile.am
index 7e1cd086d3c..f0ac432dab1 100644
--- a/src/trinitycore/Makefile.am
+++ b/src/trinitycore/Makefile.am
@@ -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
diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp
index 6a952b936d3..2e2d75d5c3c 100644
--- a/src/trinitycore/Master.cpp
+++ b/src/trinitycore/Master.cpp
@@ -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
diff --git a/src/trinitycore/WorldRunnable.cpp b/src/trinitycore/WorldRunnable.cpp
index e49e4ad74b8..bd4d3170c52 100644
--- a/src/trinitycore/WorldRunnable.cpp
+++ b/src/trinitycore/WorldRunnable.cpp
@@ -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;
diff --git a/src/trinitycore/WorldRunnable.h b/src/trinitycore/WorldRunnable.h
index 8df3a6a0c89..07ce246b04f 100644
--- a/src/trinitycore/WorldRunnable.h
+++ b/src/trinitycore/WorldRunnable.h
@@ -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();