54 #include <rtems/sysinit.h> 56 #include <rtems/test.h> 72 #include <rtems/test-info.h> 73 #include <rtems/testopts.h> 77 static char buffer[ 512 ];
79 static const T_action actions[] = {
82 T_check_rtems_barriers,
83 T_check_rtems_extensions,
84 T_check_rtems_message_queues,
85 T_check_rtems_partitions,
86 T_check_rtems_periods,
87 T_check_rtems_semaphores,
92 static const T_config test_config = {
95 .buf_size =
sizeof( buffer ),
97 .verbosity = RTEMS_TEST_VERBOSITY,
99 .action_count = T_ARRAY_SIZE( actions ),
111 exit_code = T_main( &test_config );
113 if ( exit_code == 0 ) {
120 #define MAX_TLS_SIZE RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT ) 122 #define ATTRIBUTES RTEMS_FLOATING_POINT 125 static char runner_task_storage[
134 .initial_priority = 1,
135 .storage_area = runner_task_storage,
136 .storage_size =
sizeof( runner_task_storage ),
137 .maximum_thread_local_storage_size = MAX_TLS_SIZE,
139 .attributes = ATTRIBUTES
142 static void init_runner_task(
void)
160 RTEMS_SYSINIT_CLASSIC_USER_TASKS,
161 RTEMS_SYSINIT_ORDER_MIDDLE
164 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER 166 #define CONFIGURE_MAXIMUM_PROCESSORS 4 168 #define CONFIGURE_MAXIMUM_BARRIERS 3 170 #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 3 172 #define CONFIGURE_MAXIMUM_PARTITIONS 3 174 #define CONFIGURE_MAXIMUM_PERIODS 3 176 #define CONFIGURE_MAXIMUM_SEMAPHORES 3 178 #define CONFIGURE_MAXIMUM_TASKS 3 180 #define CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE \ 181 CONFIGURE_MAXIMUM_TASKS 183 #define CONFIGURE_MAXIMUM_TIMERS 3 185 #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 3 187 #define CONFIGURE_MICROSECONDS_PER_TICK 1000 189 #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0 191 #define CONFIGURE_DISABLE_NEWLIB_REENTRANCY 193 #define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM 195 #define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION 197 #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body 199 #if defined(RTEMS_SMP) 201 #define CONFIGURE_SCHEDULER_EDF_SMP 205 RTEMS_SCHEDULER_EDF_SMP(a);
207 RTEMS_SCHEDULER_EDF_SMP(b);
209 RTEMS_SCHEDULER_EDF_SMP(c);
211 #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ 212 RTEMS_SCHEDULER_TABLE_EDF_SMP(a, rtems_build_name('A', ' ', ' ', ' ')), \ 213 RTEMS_SCHEDULER_TABLE_EDF_SMP(b, rtems_build_name('B', ' ', ' ', ' ')), \ 214 RTEMS_SCHEDULER_TABLE_EDF_SMP(c, rtems_build_name('C', ' ', ' ', ' ')) 216 #define CONFIGURE_SCHEDULER_ASSIGNMENTS \ 217 RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \ 218 RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \ 219 RTEMS_SCHEDULER_ASSIGN(2, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \ 220 RTEMS_SCHEDULER_ASSIGN(2, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL) 224 #define CONFIGURE_INIT static RTEMS_NO_RETURN void rtems_fatal(rtems_fatal_source fatal_source, rtems_fatal_code error_code)
%
Evaluate Configuration Options.
rtems_name name
This member defines the name of the task.
#define rtems_build_name(_C1, _C2, _C3, _C4)
%
int rtems_test_begin(const char *name, const RTEMS_TEST_STATE state)
Prints a begin of test message using printf().
const char rtems_test_name[]
Each test must define a test name string.
This structure defines the configuration of a task constructed by rtems_task_construct().
rtems_status_code rtems_task_start(rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument)
%
Scheduler Configuration API.
CPU_Uint32ptr rtems_task_argument
This type is used to represent task argument values.
int rtems_test_end(const char *name)
Prints an end of test message using printf().
This status code indicates successful completion.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
#define RTEMS_ALIGNED(_alignment)
Instructs the compiler in a declaration or definition to enforce the specified alignment.
#define RTEMS_MINIMUM_STACK_SIZE
%
This header file defines the RTEMS Classic API.
Interface to Kernel Print Methods.
void rtems_put_char(int c, void *arg)
Puts the character via rtems_putc().
#define RTEMS_TASK_STORAGE_SIZE(_size, _attributes)
Returns the recommended task storage area size for the specified size and task attributes.
Objects_Id rtems_id
Values of this type identify an RTEMS object.
#define RTEMS_DEFAULT_MODES
This task mode constant represents the default mode set.
rtems_status_code rtems_task_construct(const rtems_task_config *config, rtems_id *id)
Constructs a task from the specified the task configuration.
#define RTEMS_TASK_STORAGE_ALIGNMENT
This constant defines the recommended alignment of a task storage area in bytes.