summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-16 01:55:42 +0000
committerDavid Robillard <d@drobilla.net>2012-08-16 01:55:42 +0000
commitceffaaf18e99f2fa56f38f53cf3e4ea4f5099be6 (patch)
tree5e7da6ae491e9ab69bdfffcd2fdc4561ca5a4e4c /src
parent2f719c364449f3e338822e7cc740daac0870cbc9 (diff)
downloadraul-ceffaaf18e99f2fa56f38f53cf3e4ea4f5099be6.tar.gz
raul-ceffaaf18e99f2fa56f38f53cf3e4ea4f5099be6.tar.bz2
raul-ceffaaf18e99f2fa56f38f53cf3e4ea4f5099be6.zip
Remove verbose logging stuff from Thread.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4709 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/Thread.cpp26
1 files changed, 2 insertions, 24 deletions
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 <http://www.gnu.org/licenses/>.
*/
-#include <cstring>
-#include <string>
-
#include <pthread.h>
-#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