diff options
Diffstat (limited to 'host/lib/thread_priority.cpp')
-rw-r--r-- | host/lib/thread_priority.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/thread_priority.cpp b/host/lib/thread_priority.cpp index 30b184123..c35e5fcb1 100644 --- a/host/lib/thread_priority.cpp +++ b/host/lib/thread_priority.cpp @@ -58,7 +58,7 @@ static void check_priority_range(float priority){ sched_param sp; sp.sched_priority = int(priority*(max_pri - min_pri)) + min_pri; int ret = pthread_setschedparam(pthread_self(), policy, &sp); - if (ret == -1) throw std::runtime_error("error in pthread_setschedparam"); + if (ret != 0) throw std::runtime_error("error in pthread_setschedparam"); } /*********************************************************************** |