zapit/include/zapit/femanager.h: change mutex to recursive, add Lock/Unlock

This commit is contained in:
[CST] Focus
2013-08-12 16:00:51 +04:00
parent 46980f524d
commit 026fd54dcb

View File

@@ -29,7 +29,7 @@
#include <zapit/frontend_c.h>
#include <map>
#include <OpenThreads/Mutex>
#include <OpenThreads/ReentrantMutex>
#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<CFeDmx> 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__ */