From f9d6b3b462fa3db5a70e8bd1e1625d35f9e0f21b Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 27 Feb 2017 21:29:07 +0100 Subject: In class mutex and condition variable except for subscribed_signals map For now... Change-Id: I133deb39fcd0660064b3b3c2a52f86ad37cb29c2 Signed-off-by: Romain Forlot --- src/can-signals.hpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/can-signals.hpp') 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 +#include #include #include #include #include #include -#include -#include #include "timer.hpp" #include "openxc.pb.h" @@ -48,12 +47,7 @@ extern "C" */ static std::map 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(); -- cgit 1.2.3-korg