aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-28 17:10:27 -0800
committerJosh Blum <josh@joshknows.com>2011-02-28 17:10:27 -0800
commitf1996ccf3fd211eb102468e2095caeaf6d603d8c (patch)
treeef82fe3697687a2bca5b3ff03f89ae4a0ae07f6e
parentbec619cd7469dca002ff493d60f99e18df7b0a3a (diff)
downloaduhd-f1996ccf3fd211eb102468e2095caeaf6d603d8c.tar.gz
uhd-f1996ccf3fd211eb102468e2095caeaf6d603d8c.tar.bz2
uhd-f1996ccf3fd211eb102468e2095caeaf6d603d8c.zip
usrp2: minor optimization, only disable interruption when we need to wait()
-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 b20b6652e..7258585d1 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -81,10 +81,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);
}