diff options
author | michael-west <michael.west@ettus.com> | 2014-07-15 15:18:47 -0700 |
---|---|---|
committer | Ben Hilburn <ben.hilburn@ettus.com> | 2014-07-17 18:16:04 -0700 |
commit | 6e740108bf2c32632d8dc107270b49b6de3ba16d (patch) | |
tree | fa82de1df02094897b583d7cb361c573819947bb /host/lib/usrp | |
parent | 863953d972f19f38fb82eb17d1fe923a0337b0ed (diff) | |
download | uhd-6e740108bf2c32632d8dc107270b49b6de3ba16d.tar.gz uhd-6e740108bf2c32632d8dc107270b49b6de3ba16d.tar.bz2 uhd-6e740108bf2c32632d8dc107270b49b6de3ba16d.zip |
Fix for BUG #469
- Added mutex for write_uart()
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/x300/x300_fw_uart.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/host/lib/usrp/x300/x300_fw_uart.cpp b/host/lib/usrp/x300/x300_fw_uart.cpp index d87b9ab9f..b0fae124d 100644 --- a/host/lib/usrp/x300/x300_fw_uart.cpp +++ b/host/lib/usrp/x300/x300_fw_uart.cpp @@ -56,6 +56,7 @@ struct x300_uart_iface : uart_iface void write_uart(const std::string &buff) { + boost::mutex::scoped_lock(_write_mutex); BOOST_FOREACH(const char ch, buff) { if (ch == '\n') this->putchar('\r'); @@ -157,6 +158,7 @@ struct x300_uart_iface : uart_iface std::vector<boost::uint32_t> _rxcache; std::string _rxbuff; boost::mutex _read_mutex; + boost::mutex _write_mutex; }; uart_iface::sptr x300_make_uart_iface(wb_iface::sptr iface) |