diff --git a/gtk2_ardour/linux_vst_gui_support.cc b/gtk2_ardour/linux_vst_gui_support.cc index f2d287c2ea..0aded09abd 100644 --- a/gtk2_ardour/linux_vst_gui_support.cc +++ b/gtk2_ardour/linux_vst_gui_support.cc @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -42,7 +41,6 @@ #include #include #include -#include #include struct ERect{ @@ -319,9 +317,8 @@ any Xevents to all the UI callbacks plugins 'may' have registered on their windows, that is if they don't manage their own UIs **/ static void* -gui_event_loop (void* ptr) +gui_event_loop (void*) { - pthread_set_name ("LXVSTEventLoop"); VSTState* vstfx; int LXVST_sched_timer_interval = 40; //ms, 25fps XEvent event; @@ -509,20 +506,6 @@ int vstfx_init (void* ptr) assert (gui_state == -1); pthread_mutex_init (&plugin_mutex, NULL); - int thread_create_result; - - pthread_attr_t thread_attributes; - - /*Init the attribs to defaults*/ - - pthread_attr_init (&thread_attributes); - - /*Make sure the thread is joinable - this should be the default anyway - - so we can join to it on vstfx_exit*/ - - pthread_attr_setdetachstate (&thread_attributes, PTHREAD_CREATE_JOINABLE); - - /*This is where we need to open a connection to X, and start the GUI thread*/ /*Open our connection to X - all linuxVST plugin UIs handled by the LXVST engine @@ -546,7 +529,7 @@ int vstfx_init (void* ptr) /*Create the thread - use default attrs for now, don't think we need anything special*/ - thread_create_result = pthread_create (&LXVST_gui_event_thread, &thread_attributes, gui_event_loop, NULL); + int thread_create_result = pthread_create_and_store ("LXVSTEventLoop", &LXVST_gui_event_thread, gui_event_loop, NULL, 0); if (thread_create_result != 0) { diff --git a/gtk2_ardour/pingback.cc b/gtk2_ardour/pingback.cc index a1667a09d7..e0a499de3a 100644 --- a/gtk2_ardour/pingback.cc +++ b/gtk2_ardour/pingback.cc @@ -97,7 +97,6 @@ build_query_string (ArdourCurl::HttpGet const & h) static void* _pingback (void *arg) { - pthread_set_name ("Pingback"); ArdourCurl::HttpGet h; //initialize curl @@ -177,7 +176,7 @@ void pingback (const string& version, const string& announce_path) ping_call* cm = new ping_call (version, announce_path); pthread_t thread; - pthread_create_and_store ("pingback", &thread, _pingback, cm); + pthread_create_and_store ("Pingback", &thread, _pingback, cm); } } diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc index 6d4fb88a45..c097839b84 100644 --- a/gtk2_ardour/strip_silence_dialog.cc +++ b/gtk2_ardour/strip_silence_dialog.cc @@ -132,7 +132,7 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list const & v) /* Create a thread which runs while the dialogue is open to compute the silence regions */ Completed.connect (_completed_connection, invalidator(*this), boost::bind (&StripSilenceDialog::update, this), gui_context ()); _thread_should_finish = false; - pthread_create (&_thread, 0, StripSilenceDialog::_detection_thread_work, this); + pthread_create_and_store ("SilenceDetect", &_thread, StripSilenceDialog::_detection_thread_work, this, 0); signal_response().connect(sigc::mem_fun (*this, &StripSilenceDialog::finished)); } @@ -248,7 +248,6 @@ void * StripSilenceDialog::_detection_thread_work (void* arg) { StripSilenceDialog* d = reinterpret_cast (arg); - pthread_set_name ("SilenceDetect"); return d->detection_thread_work (); } diff --git a/gtk2_ardour/video_image_frame.cc b/gtk2_ardour/video_image_frame.cc index 33c07b1035..6bd737bf56 100644 --- a/gtk2_ardour/video_image_frame.cc +++ b/gtk2_ardour/video_image_frame.cc @@ -274,6 +274,8 @@ VideoImageFrame::http_get (samplepos_t fn) { queued_request=false; req_video_frame_number=fn; pthread_mutex_unlock(&queue_lock); + /* do not use `pbd pthread_create_and_store' here. + * The request thread uses aync cancellation */ int rv = pthread_create(&thread_id_tt, NULL, http_get_thread, this); thread_active=true; if (rv) {