summaryrefslogtreecommitdiffstats
path: root/src/modules/SystemBackendProc
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-20 20:04:09 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-20 20:04:09 +0200
commit325ee09f8fa61185efd6ec8b64b6432686170ac8 (patch)
tree7380bd046d2582034b44905b2dfe71c77f27c0e4 /src/modules/SystemBackendProc
parent4bbe42a77b6782fd6889e673c10316f7e668eae8 (diff)
downloadmad-325ee09f8fa61185efd6ec8b64b6432686170ac8.tar
mad-325ee09f8fa61185efd6ec8b64b6432686170ac8.zip
Module wieder heil-gebastelt
Diffstat (limited to 'src/modules/SystemBackendProc')
-rw-r--r--src/modules/SystemBackendProc/CMakeLists.txt5
-rw-r--r--src/modules/SystemBackendProc/SystemBackendProc.cpp15
2 files changed, 11 insertions, 9 deletions
diff --git a/src/modules/SystemBackendProc/CMakeLists.txt b/src/modules/SystemBackendProc/CMakeLists.txt
new file mode 100644
index 0000000..b524265
--- /dev/null
+++ b/src/modules/SystemBackendProc/CMakeLists.txt
@@ -0,0 +1,5 @@
+include_directories(${INCLUDES})
+
+add_library(SystemBackendProc MODULE
+ SystemBackendProc.cpp
+)
diff --git a/src/modules/SystemBackendProc/SystemBackendProc.cpp b/src/modules/SystemBackendProc/SystemBackendProc.cpp
index 68f9cec..d238e07 100644
--- a/src/modules/SystemBackendProc/SystemBackendProc.cpp
+++ b/src/modules/SystemBackendProc/SystemBackendProc.cpp
@@ -19,16 +19,13 @@
#include "SystemBackendProc.h"
-#include <Common/ActionManager.h>
+#include <Net/ThreadManager.h>
#include <cstdio>
#include <cstring>
#include <boost/bind.hpp>
-#define init SystemBackendProc_LTX_init
-#define deinit SystemBackendProc_LTX_deinit
-
namespace Mad {
namespace Modules {
@@ -53,7 +50,7 @@ bool SystemBackendProc::getUptimeInfo(const boost::function2<void, unsigned long
if(uptimeFile.good())
idleTime = (unsigned long)f;
- Common::ActionManager::get()->add(boost::bind(callback, uptime, idleTime));
+ Net::ThreadManager::get()->pushWork(boost::bind(callback, uptime, idleTime));
return true;
}
@@ -90,7 +87,7 @@ bool SystemBackendProc::getMemoryInfo(const boost::function4<void, unsigned long
break;
}
- Common::ActionManager::get()->add(boost::bind(callback, totalMem, freeMem, totalSwap, freeSwap));
+ Net::ThreadManager::get()->pushWork(boost::bind(callback, totalMem, freeMem, totalSwap, freeSwap));
return true;
}
@@ -112,7 +109,7 @@ bool SystemBackendProc::getLoadInfo(const boost::function5<void, unsigned long,
std::sscanf(line.c_str(), "%f %f %f %lu/%lu", &loadAvg1, &loadAvg5, &loadAvg15, &currentLoad, &nProcesses);
- Common::ActionManager::get()->add(boost::bind(callback, currentLoad, nProcesses, loadAvg1, loadAvg5, loadAvg15));
+ Net::ThreadManager::get()->pushWork(boost::bind(callback, currentLoad, nProcesses, loadAvg1, loadAvg5, loadAvg15));
return true;
}
@@ -123,11 +120,11 @@ bool SystemBackendProc::getLoadInfo(const boost::function5<void, unsigned long,
extern "C" {
-void init() {
+void SystemBackendProc_init() {
Mad::Modules::SystemBackendProc::registerBackend();
}
-void deinit() {
+void SystemBackendProc_deinit() {
Mad::Modules::SystemBackendProc::unregisterBackend();
}