From 1c1d967ec73906d50ee6e7257a4153db4ab9c507 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 18 Jun 2010 17:59:57 -0700 Subject: usrp2: init clock rate shadows for dboard iface, uhd: pthread sched fix error condition check --- host/lib/thread_priority.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/thread_priority.cpp') 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"); } /*********************************************************************** -- cgit v1.2.3