diff options
author | Philip Balister <philip@opensdr.com> | 2010-10-21 14:11:29 -0400 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2010-10-21 14:11:29 -0400 |
commit | 090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b (patch) | |
tree | ec8a6f261a7a722c6842e1d90fa976905b7ead09 /host/lib/utils/thread_priority.cpp | |
parent | c830a0d2c491fb61c2b401db94ed0a147bca4a24 (diff) | |
parent | c347ad973f4b51b00f66d7422cd03e8790de9be3 (diff) | |
download | uhd-090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b.tar.gz uhd-090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b.tar.bz2 uhd-090b0dd0d38f23cd1d7c4c6a7b0317a6fdfe2b9b.zip |
Merge branch 'usrp_e_mmap_b2' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host/lib/utils/thread_priority.cpp')
-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; } } |