summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-28 17:10:27 -0800
committerNick Foster <nick@nerdnetworks.org>2011-03-01 18:11:08 -0800
commit6b4a9212da7eb78112b575d47b5ecafebdf5f866 (patch)
tree9320da971d837e45730d6c14c9b610502d394f11 /host
parent09bf40269874608c4f6769185fa297c6fb92d1a2 (diff)
downloaduhd-6b4a9212da7eb78112b575d47b5ecafebdf5f866.tar.gz
uhd-6b4a9212da7eb78112b575d47b5ecafebdf5f866.tar.bz2
uhd-6b4a9212da7eb78112b575d47b5ecafebdf5f866.zip
usrp2: minor optimization, only disable interruption when we need to wait()
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index 082d77d3e..27a32d7a8 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -83,10 +83,10 @@ public:
* \return false on timeout
*/
UHD_INLINE bool check_fc_condition(seq_type seq, double timeout){
- boost::this_thread::disable_interruption di; //disable because the wait can throw
boost::unique_lock<boost::mutex> lock(_fc_mutex);
_last_seq_out = seq;
if (this->ready()) return true;
+ boost::this_thread::disable_interruption di; //disable because the wait can throw
return _fc_cond.timed_wait(lock, to_time_dur(timeout), _ready_fcn);
}