diff options
Diffstat (limited to 'host/lib/device3.cpp')
-rw-r--r-- | host/lib/device3.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/host/lib/device3.cpp b/host/lib/device3.cpp index 3b316e8ea..044459aec 100644 --- a/host/lib/device3.cpp +++ b/host/lib/device3.cpp @@ -15,9 +15,10 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // -#include <boost/format.hpp> #include <uhd/device3.hpp> -#include <uhd/utils/msg.hpp> +#include <uhd/utils/log.hpp> +#include <boost/format.hpp> +#include <boost/thread/lock_guard.hpp> using namespace uhd; using namespace uhd::rfnoc; @@ -68,7 +69,8 @@ std::vector<rfnoc::block_id_t> device3::find_blocks(const std::string &block_id_ void device3::clear() { - BOOST_FOREACH(const block_ctrl_base::sptr &block, _rfnoc_block_ctrl) { + boost::lock_guard<boost::mutex> lock(_block_ctrl_mutex); + for(const block_ctrl_base::sptr &block: _rfnoc_block_ctrl) { block->clear(); } } |