From ceffaaf18e99f2fa56f38f53cf3e4ea4f5099be6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 16 Aug 2012 01:55:42 +0000 Subject: Remove verbose logging stuff from Thread. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4709 a436a847-0d15-0410-975c-d299462d15a1 --- src/Thread.cpp | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/Thread.cpp b/src/Thread.cpp index d299138..59d3f1c 100644 --- a/src/Thread.cpp +++ b/src/Thread.cpp @@ -14,18 +14,9 @@ along with Raul. If not, see . */ -#include -#include - #include -#include "raul/log.hpp" #include "raul/Thread.hpp" -#include "raul/ThreadVar.hpp" - -#define LOG(s) (s("[")(_name)("] ")) - -using std::endl; namespace Raul { @@ -33,9 +24,8 @@ struct ThreadImpl { pthread_t pthread; }; -Thread::Thread(const std::string& name) +Thread::Thread() : _impl(new ThreadImpl()) - , _name(name) , _thread_exists(false) , _exit_flag(false) { @@ -60,8 +50,6 @@ void Thread::start() { if (!_thread_exists) { - LOG(info) << "Starting thread" << endl; - pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 1500000); @@ -78,7 +66,6 @@ Thread::join() _exit_flag = true; pthread_join(_impl->pthread, NULL); _thread_exists = false; - LOG(info) << "Exiting thread" << endl; } } @@ -88,16 +75,7 @@ Thread::set_scheduling(bool realtime, unsigned priority) sched_param sp; sp.sched_priority = priority; const int policy = realtime ? SCHED_FIFO : SCHED_OTHER; - const int result = pthread_setschedparam(_impl->pthread, policy, &sp); - if (!result) { - LOG(info) << (fmt("Set scheduling policy to %1% priority %2%\n") - % (realtime ? "realtime" : "normal") - % sp.sched_priority); - } else { - LOG(warn) << (fmt("Unable to set scheduling policy (%1%)\n") - % strerror(result)); - } - return !result; + return !pthread_setschedparam(_impl->pthread, policy, &sp); } } // namespace Raul -- cgit v1.2.1