SenseApiLib: Add qutex for lib state access serialization
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <dlfcn.h>
|
||||
#include <functional>
|
||||
#include <user/senseApiDesc.h>
|
||||
#include <qutex.h>
|
||||
|
||||
namespace smo {
|
||||
namespace sense_api {
|
||||
@@ -29,9 +30,9 @@ public:
|
||||
SenseApiLib(
|
||||
const std::string& path, void *_dlopen_handle,
|
||||
SMO_GET_SENSE_API_DESC_FN_TYPEDEF *descFn)
|
||||
: libraryPath(path),
|
||||
dlopen_handle(_dlopen_handle, DlCloser()),
|
||||
SMO_GET_SENSE_API_DESC_FN_NAME(descFn)
|
||||
: libraryPath(path), qutex("SenseApiLib-" + path),
|
||||
dlopen_handle(_dlopen_handle, DlCloser()),
|
||||
SMO_GET_SENSE_API_DESC_FN_NAME(descFn)
|
||||
{}
|
||||
|
||||
void setSenseApiDesc(const SenseApiDesc &desc)
|
||||
@@ -48,6 +49,7 @@ public:
|
||||
|
||||
public:
|
||||
std::string libraryPath;
|
||||
Qutex qutex;
|
||||
std::unique_ptr<void, DlCloser> dlopen_handle;
|
||||
/* UNIMPLEMENTED: API-specific cmdline options. These affect this specific
|
||||
* sense api lib's behaviour globally.
|
||||
|
||||
Reference in New Issue
Block a user