From ac6d27348d4e01035183423a031445808c0f6b90 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 21 Jul 2017 16:12:28 -0700 Subject: rfnoc: Fix potential double-overrun handling in rx stream terminator It's feasible that error messages are sent out during overrun handling, which would cause a nested invocation of handle_overrun(). This adds a lock to prevent that. --- host/lib/rfnoc/rx_stream_terminator.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'host/lib/rfnoc/rx_stream_terminator.hpp') diff --git a/host/lib/rfnoc/rx_stream_terminator.hpp b/host/lib/rfnoc/rx_stream_terminator.hpp index 5159cd34a..fb205d00c 100644 --- a/host/lib/rfnoc/rx_stream_terminator.hpp +++ b/host/lib/rfnoc/rx_stream_terminator.hpp @@ -24,6 +24,7 @@ #include #include #include // For the block macros +#include namespace uhd { namespace rfnoc { @@ -78,6 +79,8 @@ private: double _samp_rate; double _tick_rate; + std::mutex _overrun_handler_mutex; + }; /* class rx_stream_terminator */ }} /* namespace uhd::rfnoc */ -- cgit v1.2.3