diff options
author | Alexander Krutwig <alexander.krutwig@embedded-brains.de> | 2015-03-06 16:13:40 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-03-06 16:20:20 +0100 |
commit | 33b72fde61b3e50be52000e6ed9030225eab4eb0 (patch) | |
tree | 2ec76aa6d9a780941478e109fd722d566425a4fe /cpukit/libmisc/testsupport/test.h | |
parent | shell: Add PROFREPORT command (diff) | |
download | rtems-33b72fde61b3e50be52000e6ed9030225eab4eb0.tar.bz2 |
testsupport: Add cascade option to parallel test
Diffstat (limited to 'cpukit/libmisc/testsupport/test.h')
-rw-r--r-- | cpukit/libmisc/testsupport/test.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/cpukit/libmisc/testsupport/test.h b/cpukit/libmisc/testsupport/test.h index afed462a01..ae6c17e388 100644 --- a/cpukit/libmisc/testsupport/test.h +++ b/cpukit/libmisc/testsupport/test.h @@ -141,13 +141,16 @@ typedef struct { * * @param[in] ctx The parallel context. * @param[in] arg The user specified argument. + * @param[in] active_workers Count of active workers. Depends on the cascade + * option. * * @return The desired job body execution time in clock ticks. See * rtems_test_parallel_stop_job(). */ rtems_interval (*init)( rtems_test_parallel_context *ctx, - void *arg + void *arg, + size_t active_workers ); /** @@ -155,12 +158,15 @@ typedef struct { * * @param[in] ctx The parallel context. * @param[in] arg The user specified argument. + * @param[in] active_workers Count of active workers. Depends on the cascade + * option. * @param[in] worker_index The worker index. It ranges from 0 to the * processor count minus one. */ void (*body)( rtems_test_parallel_context *ctx, void *arg, + size_t active_workers, size_t worker_index ); @@ -172,13 +178,28 @@ typedef struct { * * @param[in] ctx The parallel context. * @param[in] arg The user specified argument. + * @param[in] active_workers Count of active workers. Depends on the cascade + * option. */ void (*fini)( rtems_test_parallel_context *ctx, - void *arg + void *arg, + size_t active_workers ); + /** + * @brief Job specific argument. + */ void *arg; + + /** + * @brief Job cascading flag. + * + * This flag indicates whether the job should be executed in a cascaded + * manner (the job is executed on one processor first, two processors + * afterwards and incremented step by step until all processors are used). + */ + bool cascade; } rtems_test_parallel_job; /** |