Use wpi::mutex instead of std::mutex. (#254)

This uses a priority-aware mutex on Linux platforms.
This commit is contained in:
Peter Johnson
2017-11-13 09:51:05 -08:00
committed by GitHub
parent 86d4899a54
commit 3438a17341
15 changed files with 132 additions and 129 deletions

View File

@@ -9,13 +9,13 @@
#define NETWORKTABLE_H_
#include <functional>
#include <mutex>
#include <vector>
#include "llvm/StringMap.h"
#include "networktables/NetworkTableEntry.h"
#include "networktables/TableEntryListener.h"
#include "networktables/TableListener.h"
#include "support/mutex.h"
#include "ntcore_c.h"
#include "tables/ITable.h"
@@ -38,7 +38,7 @@ class NetworkTable final : public ITable {
private:
NT_Inst m_inst;
std::string m_path;
mutable std::mutex m_mutex;
mutable wpi::mutex m_mutex;
mutable llvm::StringMap<NT_Entry> m_entries;
typedef std::pair<ITableListener*, NT_EntryListener> Listener;
std::vector<Listener> m_listeners;