diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-03-25 11:33:34 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-03-25 11:46:20 +0100 |
commit | 10a699d3fc79fa92b7df2289009098ebfee5a4f3 (patch) | |
tree | 3cbdba63cfd9753d7f2d7fd543632c0428b8297b | |
parent | bsp/altera-cyclone-v: Typo (diff) | |
download | rtems-10a699d3fc79fa92b7df2289009098ebfee5a4f3.tar.bz2 |
testsupport: Generate unique worker names
-rw-r--r-- | cpukit/libmisc/testsupport/testparallel.c | 12 |
1 files changed, 11 insertions, 1 deletions
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, |