diff options
author | Philip Balister <philip@opensdr.com> | 2010-10-21 14:17:47 -0400 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2010-10-21 14:17:47 -0400 |
commit | c31c2d7ef8e4e02854fe51a8a3b8856649464918 (patch) | |
tree | d338268cbdecf21c78a2c77e6e7f95e6f669c4ee /host/lib/utils | |
parent | 3dc06cddaf0a0cf32f76be7077d1427ff4b71a7e (diff) | |
parent | 090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b (diff) | |
download | uhd-c31c2d7ef8e4e02854fe51a8a3b8856649464918.tar.gz uhd-c31c2d7ef8e4e02854fe51a8a3b8856649464918.tar.bz2 uhd-c31c2d7ef8e4e02854fe51a8a3b8856649464918.zip |
Merge branch 'usrp_e' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host/lib/utils')
-rw-r--r-- | host/lib/utils/thread_priority.cpp | 9 |
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; } } |