diff options
author | Philip Balister <philip@opensdr.com> | 2010-10-20 20:00:09 -0400 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2010-10-20 20:00:09 -0400 |
commit | 635440c5990e7a27fdb38f694123258633e85427 (patch) | |
tree | 603ff2312dd612ea7759432f51ffb7a6c7db3448 /host/lib/utils | |
parent | 6b203950d9583ab882628311402e26cf40838aa0 (diff) | |
parent | e0c48ba5cc1033cd330e2ce73ceb03740923e954 (diff) | |
download | uhd-635440c5990e7a27fdb38f694123258633e85427.tar.gz uhd-635440c5990e7a27fdb38f694123258633e85427.tar.bz2 uhd-635440c5990e7a27fdb38f694123258633e85427.zip |
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e_mmap_b2
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; } } |