13
0

Set thread names

This commit is contained in:
Robin Gareus 2021-06-30 17:14:37 +02:00
parent 0f6e34a697
commit bf43c8d2d4
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 4 additions and 0 deletions

View File

@ -1366,6 +1366,7 @@ void*
AlsaAudioBackend::_midi_device_thread (void* arg)
{
AlsaAudioBackend* self = static_cast<AlsaAudioBackend*> (arg);
pthread_set_name ("ALSA-MIDI-LIST");
self->midi_device_thread ();
pthread_exit (0);
return 0;

View File

@ -93,6 +93,7 @@ BaseUI::set_thread_priority () const
void
BaseUI::main_thread ()
{
pthread_set_name (string_compose ("UI:%1", event_loop_name ()).c_str ());
DEBUG_TRACE (DEBUG::EventLoop, string_compose ("%1: event loop running in thread %2\n", event_loop_name(), pthread_name()));
set_event_loop_for_thread (this);
thread_init ();

View File

@ -38,6 +38,7 @@
#include "pbd/failed_constructor.h"
#include "pbd/file_archive.h"
#include "pbd/file_utils.h"
#include "pbd/pthread_utils.h"
using namespace PBD;
@ -59,6 +60,7 @@ write_callback (void* buffer, size_t size, size_t nmemb, void* d)
static void*
get_url (void* arg)
{
pthread_set_name ("FileArchiveURL");
FileArchive::Request* r = (FileArchive::Request*) arg;
CURL* curl;