use own reentrant mutex implementation

This commit is contained in:
john30
2017-08-27 14:58:23 +02:00
parent 20c38b3a2c
commit 125cbcd661
4 changed files with 57 additions and 9 deletions
+5 -5
View File
@@ -24,9 +24,9 @@
#include <string>
#include <vector>
#include <iomanip>
#include <mutex>
#include "lib/ebus/symbol.h"
#include "lib/ebus/result.h"
#include "lib/utils/thread.h"
namespace ebusd {
@@ -44,7 +44,6 @@ using std::string;
using std::map;
using std::ostream;
using std::istream;
using std::mutex;
/** the separator character used between fields. */
#define FIELD_SEPARATOR ','
@@ -275,6 +274,10 @@ class MappedFileReader : public FileReader {
*/
static const string combineRow(const map<string, string>& row);
protected:
/** a @a Mutex for access to defaults. */
Mutex m_mutex;
private:
/** whether this instance supports rows with defaults (starting with a star). */
const bool m_supportsDefaults;
@@ -282,9 +285,6 @@ class MappedFileReader : public FileReader {
/** the preferred language code (up to 2 characters), or empty. */
const string m_preferLanguage;
/** a @a mutex for access to defaults. */
mutex m_mutex;
/** the name of each column. */
vector<string> m_columnNames;
-4
View File
@@ -26,7 +26,6 @@
#include <map>
#include <queue>
#include <functional>
#include <mutex>
#include "lib/ebus/data.h"
#include "lib/ebus/result.h"
#include "lib/ebus/symbol.h"
@@ -1556,9 +1555,6 @@ class MessageMap : public MappedFileReader {
/** additional attributes by circuit name. */
map<string, AttributedItem*> m_circuitData;
/** a @a mutex for locking out changes. */
mutex m_mutex;
};
} // namespace ebusd