From 026fd54dcbc340deb0a254da38f5898d8fd969ea Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 12 Aug 2013 16:00:51 +0400 Subject: [PATCH] zapit/include/zapit/femanager.h: change mutex to recursive, add Lock/Unlock --- src/zapit/include/zapit/femanager.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/zapit/include/zapit/femanager.h b/src/zapit/include/zapit/femanager.h index ecdaaf18a..d7fa6a679 100644 --- a/src/zapit/include/zapit/femanager.h +++ b/src/zapit/include/zapit/femanager.h @@ -29,7 +29,7 @@ #include #include -#include +#include #define MAX_FE 4 #define MAX_ADAPTERS 1 @@ -85,7 +85,7 @@ class CFEManager bool have_sat; bool have_cable; bool have_locked; - OpenThreads::Mutex mutex; + OpenThreads::ReentrantMutex mutex; std::vector dmap; @@ -142,5 +142,8 @@ class CFEManager bool haveCable() { return have_cable; } bool satOnly() { return (have_sat && !have_cable); } bool cableOnly() { return (have_cable && !have_sat); } + void Lock() { mutex.lock(); } + void Unlock() { mutex.unlock(); } + }; #endif /* __femanager_h__ */