summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-14 06:18:58 +0000
committerDavid Robillard <d@drobilla.net>2012-05-14 06:18:58 +0000
commite8e347d61552be45d5db505a47b5ceec99149ca0 (patch)
tree55c7a956e9b61184e21fb29f207dc0d1f21b00cb /src
parent17cc5056bbd4c5e79ee16894f94892d5a11d521c (diff)
downloadraul-e8e347d61552be45d5db505a47b5ceec99149ca0.tar.gz
raul-e8e347d61552be45d5db505a47b5ceec99149ca0.tar.bz2
raul-e8e347d61552be45d5db505a47b5ceec99149ca0.zip
Fully test Thread::set_scheduling().
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4414 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/Thread.cpp5
1 files changed, 3 insertions, 2 deletions
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