diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-07-29 18:12:20 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-07-29 18:12:20 -0700 |
commit | 90a5d84a18aaa338092e572ff257aab1fdcc8e6b (patch) | |
tree | d31806e064b1b12a21b2245bec2c9251537a6083 /host/include | |
parent | f39c4538a3ca25c79f6b793ee0b6448051dcd751 (diff) | |
parent | 1cddf89b0ea0b509418ea9a817bd1cebbdfdb118 (diff) | |
download | uhd-90a5d84a18aaa338092e572ff257aab1fdcc8e6b.tar.gz uhd-90a5d84a18aaa338092e572ff257aab1fdcc8e6b.tar.bz2 uhd-90a5d84a18aaa338092e572ff257aab1fdcc8e6b.zip |
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhdpriv into usrp2p
Conflicts:
host/lib/usrp/usrp2/mboard_impl.cpp
host/lib/usrp/usrp2/usrp2_regs.hpp
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/transport/alignment_buffer.ipp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/host/include/uhd/transport/alignment_buffer.ipp b/host/include/uhd/transport/alignment_buffer.ipp index ed7cfd26c..61b3b60f5 100644 --- a/host/include/uhd/transport/alignment_buffer.ipp +++ b/host/include/uhd/transport/alignment_buffer.ipp @@ -57,12 +57,15 @@ namespace uhd{ namespace transport{ namespace{ /*anon*/ std::vector<elem_type> &elems, const time_duration_t &time ){ + boost::system_time exit_time = boost::get_system_time() + time; buff_contents_type buff_contents_tmp; std::list<size_t> indexes_to_do(_all_indexes); //do an initial pop to load an initial sequence id size_t index = indexes_to_do.front(); - if (not _buffs[index]->pop_with_timed_wait(buff_contents_tmp, time)) return false; + if (not _buffs[index]->pop_with_timed_wait( + buff_contents_tmp, exit_time - boost::get_system_time() + )) return false; elems[index] = buff_contents_tmp.first; seq_type expected_seq_id = buff_contents_tmp.second; indexes_to_do.pop_front(); @@ -75,7 +78,9 @@ namespace uhd{ namespace transport{ namespace{ /*anon*/ _there_was_a_clear = false; indexes_to_do = _all_indexes; index = indexes_to_do.front(); - if (not _buffs[index]->pop_with_timed_wait(buff_contents_tmp, time)) return false; + if (not _buffs[index]->pop_with_timed_wait( + buff_contents_tmp, exit_time - boost::get_system_time() + )) return false; elems[index] = buff_contents_tmp.first; expected_seq_id = buff_contents_tmp.second; indexes_to_do.pop_front(); @@ -83,7 +88,9 @@ namespace uhd{ namespace transport{ namespace{ /*anon*/ //pop an element off for this index index = indexes_to_do.front(); - if (not _buffs[index]->pop_with_timed_wait(buff_contents_tmp, time)) return false; + if (not _buffs[index]->pop_with_timed_wait( + buff_contents_tmp, exit_time - boost::get_system_time() + )) return false; //if the sequence id matches: // store the popped element into the output, |