RTEMS CPU Kit with SuperCore  4.11.3
Data Structures | Macros | Typedefs | Functions | Variables
Test Support

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.
 

Detailed Description

Test support functions.

Typedef Documentation

◆ rtems_test_parallel_worker_setup

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.

Parameters
[in]ctxThe parallel context.
[in]worker_indexThe worker index.
[in]worker_idThe worker task identifier.

Function Documentation

◆ rtems_test_begin_with_plugin()

int rtems_test_begin_with_plugin ( rtems_printk_plugin_t  printf_func,
void *  printf_arg 
)

Prints a begin of test message.

Parameters
[in]printf_funcThe formatted output function.
[in,out]printf_argThe formatted output function argument.
Returns
As specified by printf().

References rtems_test_end_with_plugin(), and rtems_test_name.

◆ rtems_test_end_with_plugin()

int rtems_test_end_with_plugin ( rtems_printk_plugin_t  printf_func,
void *  printf_arg 
)

Prints an end of test message.

Parameters
[in]printf_funcThe formatted output function.
[in,out]printf_argThe formatted output function argument.
Returns
As specified by printf().

References rtems_test_name.

Referenced by rtems_test_begin_with_plugin().

◆ rtems_test_parallel()

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.

Parameters
[in]ctxThe parallel context.
[in]worker_setupOptional handler to setup a worker task before it is started.
[in]jobsThe table of jobs.
[in]job_countThe count of jobs in the job table.