From e8e347d61552be45d5db505a47b5ceec99149ca0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 14 May 2012 06:18:58 +0000 Subject: Fully test Thread::set_scheduling(). git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4414 a436a847-0d15-0410-975c-d299462d15a1 --- src/Thread.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Thread.cpp b/src/Thread.cpp index 34d7b65..5287beb 100644 --- a/src/Thread.cpp +++ b/src/Thread.cpp @@ -116,7 +116,7 @@ Thread::join() pthread_join(_impl->pthread, NULL); } -void +bool Thread::set_scheduling(bool realtime, unsigned priority) { sched_param sp; @@ -128,9 +128,10 @@ Thread::set_scheduling(bool realtime, unsigned priority) % (realtime ? "realtime" : "normal") % sp.sched_priority); } else { - LOG(info) << (fmt("Unable to set scheduling policy (%1%)\n") + LOG(warn) << (fmt("Unable to set scheduling policy (%1%)\n") % strerror(result)); } + return !result; } } // namespace Raul -- cgit v1.2.1