summaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-06-19 20:34:13 -0700
committerJosh Blum <josh@joshknows.com>2011-06-19 20:34:13 -0700
commitd7a4ef00ad96a06b1b6a3faac81bdf5bafd8d466 (patch)
tree0cd083d0053e0dcc114f97f401036132e5530d3e /host/examples
parente4e96f2bc406d94d981f5256c972f3d3c4b81fce (diff)
downloaduhd-d7a4ef00ad96a06b1b6a3faac81bdf5bafd8d466.tar.gz
uhd-d7a4ef00ad96a06b1b6a3faac81bdf5bafd8d466.tar.bz2
uhd-d7a4ef00ad96a06b1b6a3faac81bdf5bafd8d466.zip
uhd: benchmark rate fix so we dont use metadata on timeout
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/benchmark_rate.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp
index 8e910b4b3..688cd797a 100644
--- a/host/examples/benchmark_rate.cpp
+++ b/host/examples/benchmark_rate.cpp
@@ -126,11 +126,9 @@ void benchmark_tx_rate_async_helper(uhd::usrp::multi_usrp::sptr usrp){
//setup variables and allocate buffer
uhd::async_metadata_t async_md;
- while (true){
+ while (not boost::this_thread::interruption_requested()){
- if (not usrp->get_device()->recv_async_msg(async_md)){
- if (boost::this_thread::interruption_requested()) return;
- }
+ if (not usrp->get_device()->recv_async_msg(async_md)) continue;
//handle the error codes
switch(async_md.event_code){