diff options
Diffstat (limited to 'host/lib/usrp/x300')
-rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 5 | ||||
-rw-r--r-- | host/lib/usrp/x300/x300_impl.hpp | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index c9a73db16..8e48c606a 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -1307,7 +1307,7 @@ uhd::sid_t x300_impl::allocate_sid( ) { uhd::sid_t sid = address; sid.set_src_addr(src_addr); - sid.set_src_endpoint(_sid_framer); + sid.set_src_endpoint(_sid_framer++); //increment for next setup // TODO Move all of this setup_mb() // Program the X300 to recognise it's own local address. @@ -1321,9 +1321,6 @@ uhd::sid_t x300_impl::allocate_sid( UHD_LOGGER_DEBUG("X300") << "done router config for sid " << sid ; - //increment for next setup - _sid_framer++; - return sid; } 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, |