diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-28 17:10:27 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-28 17:10:27 -0800 |
commit | f1996ccf3fd211eb102468e2095caeaf6d603d8c (patch) | |
tree | ef82fe3697687a2bca5b3ff03f89ae4a0ae07f6e /host/lib/usrp | |
parent | bec619cd7469dca002ff493d60f99e18df7b0a3a (diff) | |
download | uhd-f1996ccf3fd211eb102468e2095caeaf6d603d8c.tar.gz uhd-f1996ccf3fd211eb102468e2095caeaf6d603d8c.tar.bz2 uhd-f1996ccf3fd211eb102468e2095caeaf6d603d8c.zip |
usrp2: minor optimization, only disable interruption when we need to wait()
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 2 |
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); } |