diff options
author | David Robillard <d@drobilla.net> | 2012-05-14 05:45:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-14 05:45:15 +0000 |
commit | eee943caa90c2c18777865ed835aa2ca9f92f947 (patch) | |
tree | 2d993bd7d18b0305852d34d34d513d08d29666dd /src/server | |
parent | bf7116520bc723980edb1120eaa66455a4c66ca5 (diff) | |
download | ingen-eee943caa90c2c18777865ed835aa2ca9f92f947.tar.gz ingen-eee943caa90c2c18777865ed835aa2ca9f92f947.tar.bz2 ingen-eee943caa90c2c18777865ed835aa2ca9f92f947.zip |
Clean up Thread interface.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4411 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/JackDriver.cpp | 3 | ||||
-rw-r--r-- | src/server/PreProcessor.cpp | 2 | ||||
-rw-r--r-- | src/server/ProcessSlave.hpp | 15 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 4 |
4 files changed, 9 insertions, 15 deletions
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index 0c810f73..30673316 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -427,8 +427,7 @@ JackDriver::_process_cb(jack_nframes_t nframes) void JackDriver::_thread_init_cb() { - Raul::Thread* thread = &Raul::Thread::get(); - thread->set_name("Jack"); + Raul::Thread* thread = &Raul::Thread::get("Jack"); ThreadManager::set_flag(THREAD_PROCESS); ThreadManager::set_flag(THREAD_IS_REAL_TIME); _jack_threads.push_back(SharedPtr<Raul::Thread>(thread)); diff --git a/src/server/PreProcessor.cpp b/src/server/PreProcessor.cpp index 9fba676c..013a43dd 100644 --- a/src/server/PreProcessor.cpp +++ b/src/server/PreProcessor.cpp @@ -26,8 +26,8 @@ namespace Ingen { namespace Server { PreProcessor::PreProcessor() + : Raul::Slave("PreProcessor") { - set_name("PreProcessor"); start(); } diff --git a/src/server/ProcessSlave.hpp b/src/server/ProcessSlave.hpp index 0e866f71..f3b514ca 100644 --- a/src/server/ProcessSlave.hpp +++ b/src/server/ProcessSlave.hpp @@ -17,8 +17,6 @@ #ifndef INGEN_ENGINE_PROCESSSLAVE_HPP #define INGEN_ENGINE_PROCESSSLAVE_HPP -#include <sstream> - #include "raul/Array.hpp" #include "raul/AtomicInt.hpp" #include "raul/Slave.hpp" @@ -37,22 +35,19 @@ class CompiledPatch; class ProcessSlave : protected Raul::Slave { public: ProcessSlave(Engine& engine, bool realtime) - : _engine(engine) + : Raul::Slave((Raul::fmt("Process Slave %1%") % _next_id).str()) + , _engine(engine) , _context(NULL) , _id(_next_id++) , _index(0) , _state(STATE_FINISHED) , _compiled_patch(NULL) { - std::stringstream ss; - ss << "Process Slave "; - ss << _id; - set_name(ss.str()); - start(); - if (realtime) - set_scheduling(SCHED_FIFO, 40); + if (realtime) { + set_scheduling(true, 40); + } } ~ProcessSlave() { diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index f394e566..2cc12846 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -364,7 +364,8 @@ class MainThread : public Raul::Thread public: explicit MainThread(SharedPtr<Engine> engine, LV2Driver* driver) - : _engine(engine) + : Raul::Thread("Main") + , _engine(engine) , _driver(driver) {} @@ -499,7 +500,6 @@ ingen_instantiate(const LV2_Descriptor* descriptor, engine->set_driver(SharedPtr<Ingen::Server::Driver>(driver)); plugin->main = new MainThread(engine, driver); - plugin->main->set_name("Main"); SharedPtr<Interface> client(&driver->writer(), NullDeleter<Interface>); interface->set_respondee(client); |