diff options
author | Josh Blum <josh@joshknows.com> | 2011-04-13 13:30:01 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-04-13 13:30:01 -0700 |
commit | 44013b92e8d4be8ce036380102ae31b153423b7e (patch) | |
tree | 6254ca46b57cccc2947174d316a4f51d4c0be880 /host/lib/utils | |
parent | 3f336dc96202b3e102069e8ba28afb979bf16ee4 (diff) | |
parent | e9ca5336eaa84832ccda9dec81022f7fbba48c45 (diff) | |
download | uhd-44013b92e8d4be8ce036380102ae31b153423b7e.tar.gz uhd-44013b92e8d4be8ce036380102ae31b153423b7e.tar.bz2 uhd-44013b92e8d4be8ce036380102ae31b153423b7e.zip |
Merge branch 'thread_prio_warning'
Diffstat (limited to 'host/lib/utils')
-rw-r--r-- | host/lib/utils/thread_priority.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/host/lib/utils/thread_priority.cpp b/host/lib/utils/thread_priority.cpp index bd34055e8..a63bdf5ce 100644 --- a/host/lib/utils/thread_priority.cpp +++ b/host/lib/utils/thread_priority.cpp @@ -27,18 +27,17 @@ bool uhd::set_thread_priority_safe(float priority, bool realtime){ return true; }catch(const std::exception &e){ uhd::warning::post(str(boost::format( + "Unable to set the thread priority. Performance may be negatively affected.\n" + "Please see the general application notes in the manual for instructions.\n" "%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":""))); + ) % e.what())); return false; } } static void check_priority_range(float priority){ if (priority > +1.0 or priority < -1.0) - throw std::range_error("priority out of range [-1.0, +1.0]"); + throw uhd::value_error("priority out of range [-1.0, +1.0]"); } /*********************************************************************** |