From 702ec4a5171247e9c5f4824616ad0bc06b5adb36 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser <kaspar@schleiser.de> Date: Fri, 20 Oct 2017 23:11:02 +0200 Subject: [PATCH] sys/posix: pthread_barrier: DEBUG fix --- sys/posix/pthread/pthread_barrier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/posix/pthread/pthread_barrier.c b/sys/posix/pthread/pthread_barrier.c index 54f1f24aea..7031c71d0b 100644 --- a/sys/posix/pthread/pthread_barrier.c +++ b/sys/posix/pthread/pthread_barrier.c @@ -56,7 +56,7 @@ int pthread_barrier_wait(pthread_barrier_t *barrier) mutex_lock(&barrier->mutex); DEBUG("%s: hit a synchronization barrier. pid=%" PRIkernel_pid"\n", - sched_active_thread->name, sched_active_pid); + thread_getname(sched_active_pid), sched_active_pid); int switch_prio = -1; @@ -64,7 +64,7 @@ int pthread_barrier_wait(pthread_barrier_t *barrier) /* need to wait for further threads */ DEBUG("%s: waiting for %u threads. pid=%" PRIkernel_pid "\n", - sched_active_thread->name, barrier->count, sched_active_pid); + thread_getname(sched_active_pid), barrier->count, sched_active_pid); pthread_barrier_waiting_node_t node; node.pid = sched_active_pid; @@ -90,7 +90,7 @@ int pthread_barrier_wait(pthread_barrier_t *barrier) /* all threads have arrived, wake everybody up */ DEBUG("%s: waking every other thread up. pid=%" PRIkernel_pid "\n", - sched_active_thread->name, sched_active_pid); + thread_getname(sched_active_pid), sched_active_pid); int count = 1; /* Count number of woken up threads. * The first thread is the current thread. */ -- GitLab