From 325ee09f8fa61185efd6ec8b64b6432686170ac8 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 20 May 2009 20:04:09 +0200 Subject: Module wieder heil-gebastelt --- src/modules/SystemBackendProc/CMakeLists.txt | 5 +++++ src/modules/SystemBackendProc/SystemBackendProc.cpp | 15 ++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 src/modules/SystemBackendProc/CMakeLists.txt (limited to 'src/modules/SystemBackendProc') 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 +#include #include #include #include -#define init SystemBackendProc_LTX_init -#define deinit SystemBackendProc_LTX_deinit - namespace Mad { namespace Modules { @@ -53,7 +50,7 @@ bool SystemBackendProc::getUptimeInfo(const boost::function2add(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::function4add(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::function5add(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