From ee21aecfdc3586a9d13685e84f1972435c739178 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 4 Mar 2009 23:16:21 +0000 Subject: fixed signalcontroller fixed BOOST_IS_ABSTRACT Problem with newer versions of boost --- src/signalController.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/signalController.cpp') diff --git a/src/signalController.cpp b/src/signalController.cpp index 39748c2..12893ca 100644 --- a/src/signalController.cpp +++ b/src/signalController.cpp @@ -151,9 +151,8 @@ SignalController::~SignalController() } #ifndef _MSC_VER -void SignalController::handle(void *s) +void SignalController::handle() { - SignalController* self = reinterpret_cast(s); sigset_t signal_set; int sigNum; @@ -162,10 +161,10 @@ void SignalController::handle(void *s) sigfillset(&signal_set); sigwait(&signal_set, &sigNum); { - Lock(self->sigQueueMutex); - self->sigQueue.push(sigNum); + Lock lock(sigQueueMutex); + sigQueue.push(sigNum); } - self->sigQueueSem.up(); + sigQueueSem.up(); } } #else @@ -194,7 +193,7 @@ void SignalController::init() #error The signalhandler works only with pthreads #endif - thread = new boost::thread(boost::bind(handle, this)); + thread = new boost::thread(boost::bind(&SignalController::handle, this)); handler[SIGINT] = new SigIntHandler; handler[SIGQUIT] = new SigQuitHandler; -- cgit v1.2.3