summaryrefslogtreecommitdiff
path: root/libs/ardour/graph.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-07-11 15:09:29 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-07-11 15:09:29 -0400
commit01a4c3186a89ff38ba99d61e0b903b3c2d1e365a (patch)
tree926c8938b26a3fdce1a600f8f97b6bb7c4f5115e /libs/ardour/graph.cc
parent2b93c878d0fea64a6b1cea3d951d6170baa6b923 (diff)
Use PBD::pthread_name in debug output for portability
Diffstat (limited to 'libs/ardour/graph.cc')
-rw-r--r--libs/ardour/graph.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc
index 3ec912ecd3..12752c158e 100644
--- a/libs/ardour/graph.cc
+++ b/libs/ardour/graph.cc
@@ -22,6 +22,7 @@
#include "pbd/compose.h"
#include "pbd/debug_rt_alloc.h"
+#include "pbd/pthread_utils.h"
#include "ardour/debug.h"
#include "ardour/graph.h"
@@ -365,7 +366,7 @@ Graph::run_one()
/* update the number of threads that will still be sleeping */
_execution_tokens -= wakeup;
- DEBUG_TRACE(DEBUG::ProcessThreads, string_compose ("%1 signals %2\n", pthread_self(), wakeup));
+ DEBUG_TRACE(DEBUG::ProcessThreads, string_compose ("%1 signals %2\n", pthread_name(), wakeup));
for (int i = 0; i < wakeup; i++) {
_execution_sem.signal ();
@@ -374,12 +375,12 @@ Graph::run_one()
while (to_run == 0) {
_execution_tokens += 1;
pthread_mutex_unlock (&_trigger_mutex);
- DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 goes to sleep\n", pthread_self()));
+ DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 goes to sleep\n", pthread_name()));
_execution_sem.wait ();
if (_quit_threads) {
return true;
}
- DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 is awake\n", pthread_self()));
+ DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 is awake\n", pthread_name()));
pthread_mutex_lock (&_trigger_mutex);
if (_trigger_queue.size()) {
to_run = _trigger_queue.back();
@@ -391,7 +392,7 @@ Graph::run_one()
to_run->process();
to_run->finish (_current_chain);
- DEBUG_TRACE(DEBUG::ProcessThreads, string_compose ("%1 has finished run_one()\n", pthread_self()));
+ DEBUG_TRACE(DEBUG::ProcessThreads, string_compose ("%1 has finished run_one()\n", pthread_name()));
return false;
}
@@ -559,7 +560,7 @@ Graph::process_one_route (Route* route)
assert (route);
- DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 runs route %2\n", pthread_self(), route->name()));
+ DEBUG_TRACE (DEBUG::ProcessThreads, string_compose ("%1 runs route %2\n", pthread_name(), route->name()));
if (_process_silent) {
retval = route->silent_roll (_process_nframes, _process_start_frame, _process_end_frame, need_butler);