From 4df3666738607039445ebc9fa083bf5c23ac5539 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 12 Sep 2013 11:29:47 -0400 Subject: add AudioBackendNativeThread to serve the same role as jack_native_thread_t --- libs/ardour/graph.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libs/ardour/graph.cc') diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc index cb0fa1b21a..c8e374cddc 100644 --- a/libs/ardour/graph.cc +++ b/libs/ardour/graph.cc @@ -101,7 +101,7 @@ Graph::reset_thread_list () } Glib::Threads::Mutex::Lock lm (_session.engine().process_lock()); - pthread_t a_thread; + AudioBackendNativeThread a_thread; if (!_thread_list.empty()) { drop_threads (); @@ -146,9 +146,8 @@ Graph::drop_threads () _callback_start_sem.signal (); - for (list::iterator i = _thread_list.begin(); i != _thread_list.end(); ++i) { - void* status; - pthread_join (*i, &status); + for (list::iterator i = _thread_list.begin(); i != _thread_list.end(); ++i) { + AudioEngine::instance()->wait_for_process_thread_exit (*i); } _thread_list.clear (); @@ -584,8 +583,8 @@ Graph::process_one_route (Route* route) bool Graph::in_process_thread () const { - for (list::const_iterator i = _thread_list.begin (); i != _thread_list.end(); ++i) { - if (*i == pthread_self()) { + for (list::const_iterator i = _thread_list.begin (); i != _thread_list.end(); ++i) { + if (self_thread_equal (*i)) { return true; } } -- cgit v1.2.3