summaryrefslogtreecommitdiffstats
path: root/src/can-signals.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/can-signals.hpp')
-rw-r--r--src/can-signals.hpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/can-signals.hpp b/src/can-signals.hpp
index fb77df5c..c2eaea4c 100644
--- a/src/can-signals.hpp
+++ b/src/can-signals.hpp
@@ -18,13 +18,12 @@
#pragma once
#include <map>
+#include <mutex>
#include <queue>
#include <vector>
#include <string>
#include <thread>
#include <linux/can.h>
-#include <mutex>
-#include <condition_variable>
#include "timer.hpp"
#include "openxc.pb.h"
@@ -48,12 +47,7 @@ extern "C"
*/
static std::map<std::string, struct afb_event> subscribed_signals;
-/**
-* @brief Mutex allowing safe manipulation on subscribed_signals map.
-* @desc To ensure that the map object isn't modified when we read it, you
-* have to set this mutex before use subscribed_signals map object.
-*/
-extern std::mutex subscribed_signals_mutex;
+std::mutex& get_subscribed_signals_mutex();
/** Public: Return the currently active CAN configuration. */
CanMessageSet* getActiveMessageSet();