aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-02-24 08:16:26 +0000
committerRomain Forlot <romain.forlot@iot.bzh>2017-02-24 08:16:47 +0000
commitb33043dafb15c76a02e4532d3a161bef4e191625 (patch)
tree4365bcb05754df28a287f06ce4e09d44254eb1c4
parent92bc628a7b7cbf141c2bbc7e4ea3eeac62cd30dd (diff)
Add comment
Change-Id: Ifc04a66e54889cc4f735cad1ac9caaeb31230566 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--src/can_reader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/can_reader.cpp b/src/can_reader.cpp
index f984c70a..e2f62774 100644
--- a/src/can_reader.cpp
+++ b/src/can_reader.cpp
@@ -27,6 +27,9 @@ void can_reader(can_bus_dev_t &can_bus_dev, can_bus_t& can_bus)
while(can_bus_dev.is_running())
{
+ /* Declare and take lock ownership of can_frame_mutex.
+ * then waiting notification for a new can frame arrival
+ */
std::unique_lock<std::mutex> can_frame_lock(can_frame_mutex);
new_can_frame.wait(can_frame_lock);
can_message.convert_from_canfd_frame(can_bus_dev.read());