diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-12 11:29:47 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-12 11:29:47 -0400 |
commit | 4df3666738607039445ebc9fa083bf5c23ac5539 (patch) | |
tree | 3388082f2e73c020edde31796fd977a71cb3abae /libs/ardour/graph.cc | |
parent | 9f2ab81df6709d7b5d5701abbedc63d39e7330ab (diff) |
add AudioBackendNativeThread to serve the same role as jack_native_thread_t
Diffstat (limited to 'libs/ardour/graph.cc')
-rw-r--r-- | libs/ardour/graph.cc | 11 |
1 files changed, 5 insertions, 6 deletions
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<pthread_t>::iterator i = _thread_list.begin(); i != _thread_list.end(); ++i) { - void* status; - pthread_join (*i, &status); + for (list<AudioBackendNativeThread>::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<pthread_t>::const_iterator i = _thread_list.begin (); i != _thread_list.end(); ++i) { - if (*i == pthread_self()) { + for (list<AudioBackendNativeThread>::const_iterator i = _thread_list.begin (); i != _thread_list.end(); ++i) { + if (self_thread_equal (*i)) { return true; } } |