Add comment
authorRomain Forlot <romain.forlot@iot.bzh>
Fri, 24 Feb 2017 08:16:26 +0000 (08:16 +0000)
committerRomain Forlot <romain.forlot@iot.bzh>
Fri, 24 Feb 2017 08:16:47 +0000 (08:16 +0000)
Change-Id: Ifc04a66e54889cc4f735cad1ac9caaeb31230566
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
src/can_reader.cpp

index f984c70..e2f6277 100644 (file)
@@ -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());