RTEMS CPU Kit with SuperCore
4.11.3
|
Test support functions. More...
Data Structures | |
struct | rtems_test_parallel_context |
Internal context for parallel job execution. More... | |
struct | rtems_test_parallel_job |
Basic parallel job description. More... | |
Macros | |
#define | RTEMS_TEST_INITIAL_EXTENSION { NULL, NULL, NULL, NULL, NULL, NULL, NULL, rtems_test_fatal_extension } |
Initial extension for tests. | |
Typedefs | |
typedef void(* | rtems_test_parallel_worker_setup) (rtems_test_parallel_context *ctx, size_t worker_index, rtems_id worker_id) |
Worker task setup handler. More... | |
Functions | |
void | rtems_test_fatal_extension (rtems_fatal_source source, bool is_internal, rtems_fatal_code code) |
Fatal extension for tests. | |
int | rtems_test_begin_with_plugin (rtems_printk_plugin_t printf_func, void *printf_arg) |
Prints a begin of test message. More... | |
int | rtems_test_end_with_plugin (rtems_printk_plugin_t printf_func, void *printf_arg) |
Prints an end of test message. More... | |
void | rtems_test_parallel (rtems_test_parallel_context *ctx, rtems_test_parallel_worker_setup worker_setup, const rtems_test_parallel_job *jobs, size_t job_count) |
Runs a bunch of jobs in parallel on all processors of the system. More... | |
Variables | |
const char | rtems_test_name [] |
Each test must define a test name string. | |
Test support functions.
typedef void(* rtems_test_parallel_worker_setup) (rtems_test_parallel_context *ctx, size_t worker_index, rtems_id worker_id) |
Worker task setup handler.
Called during rtems_test_parallel() to optionally setup a worker task before it is started.
[in] | ctx | The parallel context. |
[in] | worker_index | The worker index. |
[in] | worker_id | The worker task identifier. |
int rtems_test_begin_with_plugin | ( | rtems_printk_plugin_t | printf_func, |
void * | printf_arg | ||
) |
Prints a begin of test message.
[in] | printf_func | The formatted output function. |
[in,out] | printf_arg | The formatted output function argument. |
References rtems_test_end_with_plugin(), and rtems_test_name.
int rtems_test_end_with_plugin | ( | rtems_printk_plugin_t | printf_func, |
void * | printf_arg | ||
) |
Prints an end of test message.
[in] | printf_func | The formatted output function. |
[in,out] | printf_arg | The formatted output function argument. |
References rtems_test_name.
Referenced by rtems_test_begin_with_plugin().
void rtems_test_parallel | ( | rtems_test_parallel_context * | ctx, |
rtems_test_parallel_worker_setup | worker_setup, | ||
const rtems_test_parallel_job * | jobs, | ||
size_t | job_count | ||
) |
Runs a bunch of jobs in parallel on all processors of the system.
The worker tasks inherit the priority of the executing task.
There are SMP barriers before and after the job body.
[in] | ctx | The parallel context. |
[in] | worker_setup | Optional handler to setup a worker task before it is started. |
[in] | jobs | The table of jobs. |
[in] | job_count | The count of jobs in the job table. |