diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2017-04-04 19:21:31 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-04-05 17:16:31 -0700 |
commit | 4ab72eb9991d503d8cd329b31572d966ef0e1ae8 (patch) | |
tree | 65daea22e4f3dcb25b6d562b82b97da2b4887d88 /host/lib/device3.cpp | |
parent | 15d9c6850c23c867c8ec823dedd20c7ec09d7e6b (diff) | |
download | uhd-4ab72eb9991d503d8cd329b31572d966ef0e1ae8.tar.gz uhd-4ab72eb9991d503d8cd329b31572d966ef0e1ae8.tar.bz2 uhd-4ab72eb9991d503d8cd329b31572d966ef0e1ae8.zip |
device3: Fixed potential concurreny issues
- Protected block_ctrl vector with a mutex
- Note: const block accessors are not thread safe
- Removed sid_framer from base device3 class
- Made x300,e300 sid_framers atomic
Diffstat (limited to 'host/lib/device3.cpp')
-rw-r--r-- | host/lib/device3.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/host/lib/device3.cpp b/host/lib/device3.cpp index c3bfb83d2..b2f27e744 100644 --- a/host/lib/device3.cpp +++ b/host/lib/device3.cpp @@ -68,6 +68,7 @@ std::vector<rfnoc::block_id_t> device3::find_blocks(const std::string &block_id_ void device3::clear() { + boost::lock_guard<boost::mutex> lock(_block_ctrl_mutex); for(const block_ctrl_base::sptr &block: _rfnoc_block_ctrl) { block->clear(); } |