diff --git a/tests/thread_float/main.c b/tests/thread_float/main.c index 693e127dfafe8..336860ce4de05 100644 --- a/tests/thread_float/main.c +++ b/tests/thread_float/main.c @@ -46,11 +46,9 @@ static void timer_cb(void *arg) static void *thread1(void *arg) { - (void) arg; - float f, init; - printf("THREAD %" PRIkernel_pid " start\n", thread_getpid()); + printf("THREAD %s start\n", (const char *)arg); init = 1.0 * thread_getpid(); f = init; @@ -60,7 +58,7 @@ static void *thread1(void *arg) f = f + 1.0 / f; } mutex_lock(&lock); - printf("T(%" PRIkernel_pid "): %f\n", thread_getpid(), (double)f); + printf("%s: %f\n", (const char *)arg, (double)f); mutex_unlock(&lock); init += 1.0; f = init; @@ -70,11 +68,9 @@ static void *thread1(void *arg) static void *thread2(void *arg) { - (void) arg; - float f, init; - printf("THREAD %" PRIkernel_pid " start\n", thread_getpid()); + printf("THREAD %s start\n", (const char *)arg); init = 1.0 * thread_getpid(); f = init; @@ -91,15 +87,18 @@ static void *thread2(void *arg) int main(void) { + const char *t1_name = "t1"; + const char *t2_name = "t2"; + const char *t3_name = "t3"; p1 = thread_create(t1_stack, sizeof(t1_stack), THREAD_PRIORITY_MAIN + 1, THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST, - thread1, NULL, "nr1"); + thread1, (void *)t1_name, t1_name); p2 = thread_create(t2_stack, sizeof(t2_stack), THREAD_PRIORITY_MAIN + 1, THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST, - thread2, NULL, "nr2"); + thread2, (void *)t2_name, t2_name); p3 = thread_create(t3_stack, sizeof(t3_stack), THREAD_PRIORITY_MAIN + 1, THREAD_CREATE_WOUT_YIELD | THREAD_CREATE_STACKTEST, - thread1, NULL, "nr3"); + thread1, (void *)t3_name, t3_name); puts("THREADS CREATED\n"); timer.callback = timer_cb;