summaryrefslogtreecommitdiffstats
path: root/host/lib/utils
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-10-08 16:58:45 -0700
committerNick Foster <nick@nerdnetworks.org>2010-10-08 16:58:45 -0700
commit3df994e1c784d7037e869610f1417fe64e0e89a8 (patch)
tree03183a0bff1b128d70d90aee5f9e6c641b9cf999 /host/lib/utils
parent4a6990c5d3019ca6881464f135a315e3ec022b93 (diff)
parent58e1ca09772408d5d18ee219146fe57d2045c496 (diff)
downloaduhd-3df994e1c784d7037e869610f1417fe64e0e89a8.tar.gz
uhd-3df994e1c784d7037e869610f1417fe64e0e89a8.tar.bz2
uhd-3df994e1c784d7037e869610f1417fe64e0e89a8.zip
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp2p
Conflicts: host/lib/usrp/usrp2/io_impl.cpp host/lib/usrp/usrp2/mboard_impl.cpp
Diffstat (limited to 'host/lib/utils')
-rw-r--r--host/lib/utils/thread_priority.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/host/lib/utils/thread_priority.cpp b/host/lib/utils/thread_priority.cpp
index c35e5fcb1..f09d1b1d6 100644
--- a/host/lib/utils/thread_priority.cpp
+++ b/host/lib/utils/thread_priority.cpp
@@ -16,6 +16,8 @@
//
#include <uhd/utils/thread_priority.hpp>
+#include <uhd/utils/warning.hpp>
+#include <boost/format.hpp>
#include <stdexcept>
#include <iostream>
@@ -24,7 +26,12 @@ bool uhd::set_thread_priority_safe(float priority, bool realtime){
set_thread_priority(priority, realtime);
return true;
}catch(const std::exception &e){
- std::cerr << "set_thread_priority: " << e.what() << std::endl;
+ uhd::print_warning(str(boost::format(
+ "%s\n"
+ "Failed to set thread priority %d (%s):\n"
+ "Performance may be negatively affected.\n"
+ "See the general application notes.\n"
+ ) % e.what() % priority % (realtime?"realtime":"")));
return false;
}
}