aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300/x300_impl.hpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2017-04-04 19:21:31 -0700
committerMartin Braun <martin.braun@ettus.com>2017-04-05 17:16:31 -0700
commit4ab72eb9991d503d8cd329b31572d966ef0e1ae8 (patch)
tree65daea22e4f3dcb25b6d562b82b97da2b4887d88 /host/lib/usrp/x300/x300_impl.hpp
parent15d9c6850c23c867c8ec823dedd20c7ec09d7e6b (diff)
downloaduhd-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/usrp/x300/x300_impl.hpp')
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index 7bb624577..2de295bd9 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -39,6 +39,7 @@
#include <uhd/rfnoc/block_ctrl.hpp>
///////////// RFNOC /////////////////////
#include <boost/dynamic_bitset.hpp>
+#include <atomic>
static const std::string X300_FW_FILE_NAME = "usrp_x300_fw.bin";
static const std::string X300_DEFAULT_CLOCK_SOURCE = "internal";
@@ -215,7 +216,7 @@ private:
//task for periodically reclaiming the device from others
void claimer_loop(uhd::wb_iface::sptr);
- size_t _sid_framer;
+ std::atomic<size_t> _sid_framer;
uhd::sid_t allocate_sid(
mboard_members_t &mb,