summaryrefslogtreecommitdiffstats
path: root/src/modules/SystemBackendProc/SystemBackendProc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/SystemBackendProc/SystemBackendProc.cpp')
-rw-r--r--src/modules/SystemBackendProc/SystemBackendProc.cpp15
1 files changed, 6 insertions, 9 deletions
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();
}