From 10a699d3fc79fa92b7df2289009098ebfee5a4f3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 25 Mar 2015 11:33:34 +0100 Subject: testsupport: Generate unique worker names --- cpukit/libmisc/testsupport/testparallel.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cpukit/libmisc/testsupport/testparallel.c b/cpukit/libmisc/testsupport/testparallel.c index 86c685b113..dabd5646f2 100644 --- a/cpukit/libmisc/testsupport/testparallel.c +++ b/cpukit/libmisc/testsupport/testparallel.c @@ -111,6 +111,11 @@ static void worker_task(rtems_task_argument arg) } } +static char digit(size_t i, size_t pos) +{ + return '0' + (i / pos) % 10; +} + void rtems_test_parallel( rtems_test_parallel_context *ctx, rtems_test_parallel_worker_setup worker_setup, @@ -158,7 +163,12 @@ void rtems_test_parallel( rtems_id worker_id; sc = rtems_task_create( - rtems_build_name('W', 'O', 'R', 'K'), + rtems_build_name( + 'W', + digit(worker_index, 100), + digit(worker_index, 10), + digit(worker_index, 1) + ), worker_priority, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, -- cgit v1.2.3