summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-20 17:07:03 -0700
committerJosh Blum <josh@joshknows.com>2011-07-20 17:07:03 -0700
commit96bd5d54d60a5a252a6474dbc8ef3eaec06a65e5 (patch)
tree065bce55c511b00f2bb9983a4041d9fa3aa3d16a /host/lib/usrp/usrp2
parent5f17d1ffb7106b914b1e3d3af47809d75ca5e011 (diff)
downloaduhd-96bd5d54d60a5a252a6474dbc8ef3eaec06a65e5.tar.gz
uhd-96bd5d54d60a5a252a6474dbc8ef3eaec06a65e5.tar.bz2
uhd-96bd5d54d60a5a252a6474dbc8ef3eaec06a65e5.zip
usrp2: workaround for older boost thread sleep
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index aaa5acbd5..b621c4c25 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -132,7 +132,9 @@ public:
boost::uint32_t curr_secs = this->peek32(U2_REG_TIME64_SECS_RB_IMM);
this->get_reg<boost::uint32_t, USRP2_REG_ACTION_FW_POKE32>(U2_FW_REG_LOCK_TIME, curr_secs);
//sleep for a bit
+ try{//HACK this try/catch is a work-around for when sleep throws something other than thread_interrupted
boost::this_thread::sleep(boost::posix_time::milliseconds(1500));
+ }catch(...){throw boost::thread_interrupted();}
}
/***********************************************************************