mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Set thread-names (libs)
This commit is contained in:
parent
d6a38d5450
commit
c365c6cdb2
16 changed files with 33 additions and 3 deletions
|
|
@ -19,6 +19,7 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "ardour/analyser.h"
|
#include "ardour/analyser.h"
|
||||||
#include "ardour/audiofilesource.h"
|
#include "ardour/audiofilesource.h"
|
||||||
#include "ardour/rc_configuration.h"
|
#include "ardour/rc_configuration.h"
|
||||||
|
|
@ -27,6 +28,8 @@
|
||||||
|
|
||||||
#include "pbd/compose.h"
|
#include "pbd/compose.h"
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
|
#include "pbd/pthread_utils.h"
|
||||||
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
@ -51,6 +54,7 @@ Analyser::~Analyser ()
|
||||||
static void
|
static void
|
||||||
analyser_work ()
|
analyser_work ()
|
||||||
{
|
{
|
||||||
|
pthread_set_name ("Analyzer");
|
||||||
Analyser::work ();
|
Analyser::work ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -598,6 +598,7 @@ void
|
||||||
AudioEngine::do_reset_backend()
|
AudioEngine::do_reset_backend()
|
||||||
{
|
{
|
||||||
SessionEvent::create_per_thread_pool (X_("Backend reset processing thread"), 1024);
|
SessionEvent::create_per_thread_pool (X_("Backend reset processing thread"), 1024);
|
||||||
|
pthread_set_name ("EngineWatchdog");
|
||||||
|
|
||||||
Glib::Threads::Mutex::Lock guard (_reset_request_lock);
|
Glib::Threads::Mutex::Lock guard (_reset_request_lock);
|
||||||
|
|
||||||
|
|
@ -658,6 +659,7 @@ void
|
||||||
AudioEngine::do_devicelist_update()
|
AudioEngine::do_devicelist_update()
|
||||||
{
|
{
|
||||||
SessionEvent::create_per_thread_pool (X_("Device list update processing thread"), 512);
|
SessionEvent::create_per_thread_pool (X_("Device list update processing thread"), 512);
|
||||||
|
pthread_set_name ("DeviceList");
|
||||||
|
|
||||||
Glib::Threads::Mutex::Lock guard (_devicelist_update_lock);
|
Glib::Threads::Mutex::Lock guard (_devicelist_update_lock);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,7 @@ void
|
||||||
AutomationWatch::thread ()
|
AutomationWatch::thread ()
|
||||||
{
|
{
|
||||||
pbd_set_thread_priority (pthread_self(), PBD_SCHED_FIFO, AudioEngine::instance()->client_real_time_priority() - 3);
|
pbd_set_thread_priority (pthread_self(), PBD_SCHED_FIFO, AudioEngine::instance()->client_real_time_priority() - 3);
|
||||||
|
pthread_set_name ("AutomationWatch");
|
||||||
while (_run_thread) {
|
while (_run_thread) {
|
||||||
Glib::usleep ((gulong) floor (Config->get_automation_interval_msecs() * 1000));
|
Glib::usleep ((gulong) floor (Config->get_automation_interval_msecs() * 1000));
|
||||||
timer ();
|
timer ();
|
||||||
|
|
|
||||||
|
|
@ -274,6 +274,7 @@ MidiPatchManager::load_midnams ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PBD::notify_event_loops_about_thread_creation (pthread_self(), "midi-patch-manager", 8);
|
PBD::notify_event_loops_about_thread_creation (pthread_self(), "midi-patch-manager", 8);
|
||||||
|
pthread_set_name ("MIDNAMLoader");
|
||||||
|
|
||||||
{
|
{
|
||||||
Glib::Threads::Mutex::Lock lm (_lock);
|
Glib::Threads::Mutex::Lock lm (_lock);
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ RTTaskList::drop_threads ()
|
||||||
RTTaskList::_thread_run (void *arg)
|
RTTaskList::_thread_run (void *arg)
|
||||||
{
|
{
|
||||||
RTTaskList *d = static_cast<RTTaskList *>(arg);
|
RTTaskList *d = static_cast<RTTaskList *>(arg);
|
||||||
|
pthread_set_name ("RTTaskList");
|
||||||
d->run ();
|
d->run ();
|
||||||
pthread_exit (0);
|
pthread_exit (0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -6922,6 +6922,7 @@ void *
|
||||||
Session::auto_connect_thread (void *arg)
|
Session::auto_connect_thread (void *arg)
|
||||||
{
|
{
|
||||||
Session *s = static_cast<Session *>(arg);
|
Session *s = static_cast<Session *>(arg);
|
||||||
|
pthread_set_name (X_("autoconnect"));
|
||||||
s->auto_connect_thread_run ();
|
s->auto_connect_thread_run ();
|
||||||
pthread_exit (0);
|
pthread_exit (0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -6930,7 +6931,6 @@ Session::auto_connect_thread (void *arg)
|
||||||
void
|
void
|
||||||
Session::auto_connect_thread_run ()
|
Session::auto_connect_thread_run ()
|
||||||
{
|
{
|
||||||
pthread_set_name (X_("autoconnect"));
|
|
||||||
SessionEvent::create_per_thread_pool (X_("autoconnect"), 1024);
|
SessionEvent::create_per_thread_pool (X_("autoconnect"), 1024);
|
||||||
PBD::notify_event_loops_about_thread_creation (pthread_self(), X_("autoconnect"), 1024);
|
PBD::notify_event_loops_about_thread_creation (pthread_self(), X_("autoconnect"), 1024);
|
||||||
pthread_mutex_lock (&_auto_connect_mutex);
|
pthread_mutex_lock (&_auto_connect_mutex);
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
#include "pbd/enumwriter.h"
|
#include "pbd/enumwriter.h"
|
||||||
|
#include "pbd/pthread_utils.h"
|
||||||
|
|
||||||
#include <glibmm/threads.h>
|
#include <glibmm/threads.h>
|
||||||
|
|
||||||
|
|
@ -1087,6 +1088,7 @@ void *
|
||||||
Session::emit_thread (void *arg)
|
Session::emit_thread (void *arg)
|
||||||
{
|
{
|
||||||
Session *s = static_cast<Session *>(arg);
|
Session *s = static_cast<Session *>(arg);
|
||||||
|
pthread_set_name ("SessionSignals");
|
||||||
s->emit_thread_run ();
|
s->emit_thread_run ();
|
||||||
pthread_exit (0);
|
pthread_exit (0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ static void
|
||||||
peak_thread_work ()
|
peak_thread_work ()
|
||||||
{
|
{
|
||||||
SessionEvent::create_per_thread_pool (X_("PeakFile Builder "), 64);
|
SessionEvent::create_per_thread_pool (X_("PeakFile Builder "), 64);
|
||||||
|
pthread_set_name ("PeakFileBuilder");
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,13 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "ardour/worker.h"
|
#include <glibmm/timer.h>
|
||||||
|
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
#include "pbd/compose.h"
|
#include "pbd/compose.h"
|
||||||
|
#include "pbd/pthread_utils.h"
|
||||||
|
|
||||||
#include <glibmm/timer.h>
|
#include "ardour/worker.h"
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
||||||
|
|
@ -136,6 +138,8 @@ Worker::emit_responses()
|
||||||
void
|
void
|
||||||
Worker::run()
|
Worker::run()
|
||||||
{
|
{
|
||||||
|
pthread_set_name ("LV2Worker");
|
||||||
|
|
||||||
void* buf = NULL;
|
void* buf = NULL;
|
||||||
size_t buf_size = 0;
|
size_t buf_size = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,16 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "pbd/gstdio_compat.h"
|
#include "pbd/gstdio_compat.h"
|
||||||
|
#include "pbd/pthread_utils.h"
|
||||||
#include "pbd/ringbuffer.h"
|
#include "pbd/ringbuffer.h"
|
||||||
|
|
||||||
#include "audiographer/flag_debuggable.h"
|
#include "audiographer/flag_debuggable.h"
|
||||||
#include "audiographer/sink.h"
|
#include "audiographer/sink.h"
|
||||||
#include "sndfile_writer.h"
|
#include "sndfile_writer.h"
|
||||||
#include "sndfile_reader.h"
|
#include "sndfile_reader.h"
|
||||||
|
|
||||||
#include "tmp_file.h"
|
#include "tmp_file.h"
|
||||||
|
|
||||||
namespace AudioGrapher
|
namespace AudioGrapher
|
||||||
|
|
@ -133,6 +136,7 @@ class TmpFileRt
|
||||||
static void * _disk_thread (void *arg)
|
static void * _disk_thread (void *arg)
|
||||||
{
|
{
|
||||||
TmpFileRt *d = static_cast<TmpFileRt *>(arg);
|
TmpFileRt *d = static_cast<TmpFileRt *>(arg);
|
||||||
|
pthread_set_name ("ExportDiskIO");
|
||||||
d->disk_thread ();
|
d->disk_thread ();
|
||||||
pthread_exit (0);
|
pthread_exit (0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ AlsaMidiIO::~AlsaMidiIO ()
|
||||||
static void * pthread_process (void *arg)
|
static void * pthread_process (void *arg)
|
||||||
{
|
{
|
||||||
AlsaMidiIO *d = static_cast<AlsaMidiIO *>(arg);
|
AlsaMidiIO *d = static_cast<AlsaMidiIO *>(arg);
|
||||||
|
pthread_set_name ("AlsaMidiIO");
|
||||||
d->main_process_thread ();
|
d->main_process_thread ();
|
||||||
pthread_exit (0);
|
pthread_exit (0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,7 @@ void*
|
||||||
AlsaAudioSlave::_process_thread (void* arg)
|
AlsaAudioSlave::_process_thread (void* arg)
|
||||||
{
|
{
|
||||||
AlsaAudioSlave* aas = static_cast<AlsaAudioSlave*> (arg);
|
AlsaAudioSlave* aas = static_cast<AlsaAudioSlave*> (arg);
|
||||||
|
pthread_set_name ("AlsaAudioSlave");
|
||||||
return aas->process_thread ();
|
return aas->process_thread ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -504,6 +504,7 @@ CoreAudioBackend::launch_control_app ()
|
||||||
static void * pthread_freewheel (void *arg)
|
static void * pthread_freewheel (void *arg)
|
||||||
{
|
{
|
||||||
CoreAudioBackend *d = static_cast<CoreAudioBackend *>(arg);
|
CoreAudioBackend *d = static_cast<CoreAudioBackend *>(arg);
|
||||||
|
pthread_set_name ("CAFreewheel");
|
||||||
d->freewheel_thread ();
|
d->freewheel_thread ();
|
||||||
pthread_exit (0);
|
pthread_exit (0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
|
|
||||||
#include "pbd/file_utils.h"
|
#include "pbd/file_utils.h"
|
||||||
#include "pbd/search_path.h"
|
#include "pbd/search_path.h"
|
||||||
|
#include "pbd/pthread_utils.h"
|
||||||
#include "pbd/system_exec.h"
|
#include "pbd/system_exec.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
@ -370,6 +371,7 @@ SystemExec::~SystemExec ()
|
||||||
static void*
|
static void*
|
||||||
interposer_thread (void *arg) {
|
interposer_thread (void *arg) {
|
||||||
SystemExec *sex = static_cast<SystemExec *>(arg);
|
SystemExec *sex = static_cast<SystemExec *>(arg);
|
||||||
|
pthread_set_name ("ExecStdOut");
|
||||||
sex->output_interposer();
|
sex->output_interposer();
|
||||||
pthread_exit(0);
|
pthread_exit(0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#include "ardour/lmath.h"
|
#include "ardour/lmath.h"
|
||||||
|
|
||||||
#include "pbd/cpus.h"
|
#include "pbd/cpus.h"
|
||||||
|
#include "pbd/pthread_utils.h"
|
||||||
|
|
||||||
#include "ardour/audioregion.h"
|
#include "ardour/audioregion.h"
|
||||||
#include "ardour/audiosource.h"
|
#include "ardour/audiosource.h"
|
||||||
|
|
@ -438,6 +439,7 @@ WaveViewDrawingThread::quit ()
|
||||||
void
|
void
|
||||||
WaveViewDrawingThread::run ()
|
WaveViewDrawingThread::run ()
|
||||||
{
|
{
|
||||||
|
pthread_set_name ("WaveViewDrawing");
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
if (g_atomic_int_get (&_quit)) {
|
if (g_atomic_int_get (&_quit)) {
|
||||||
|
|
|
||||||
|
|
@ -680,6 +680,9 @@ void*
|
||||||
Convlevel::static_main (void* arg)
|
Convlevel::static_main (void* arg)
|
||||||
{
|
{
|
||||||
((Convlevel*)arg)->main ();
|
((Convlevel*)arg)->main ();
|
||||||
|
#if !defined PTW32_VERSION && defined _GNU_SOURCE
|
||||||
|
pthread_setname_np (pthread_self(), "ZConvlevel");
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue