File indexing completed on 2025-05-11 08:24:44
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 #ifdef HAVE_CONFIG_H
0042 #include "config.h"
0043 #endif
0044
0045 #define CONFIGURE_INIT
0046 #include "system.h"
0047
0048 const char rtems_test_name[] = "SP 11";
0049
0050 rtems_task Init(
0051 rtems_task_argument argument
0052 )
0053 {
0054 rtems_status_code status;
0055
0056 TEST_BEGIN();
0057
0058 Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
0059 Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
0060
0061 status = rtems_task_create(
0062 Task_name[ 1 ],
0063 4,
0064 RTEMS_MINIMUM_STACK_SIZE * 2,
0065 RTEMS_DEFAULT_MODES,
0066 RTEMS_DEFAULT_ATTRIBUTES,
0067 &Task_id[ 1 ]
0068 );
0069 directive_failed( status, "rtems_task_create of TA1" );
0070
0071 status = rtems_task_create(
0072 Task_name[ 2 ],
0073 4,
0074 RTEMS_MINIMUM_STACK_SIZE * 2,
0075 RTEMS_DEFAULT_MODES,
0076 RTEMS_DEFAULT_ATTRIBUTES,
0077 &Task_id[ 2 ]
0078 );
0079 directive_failed( status, "rtems_task_create of TA2" );
0080
0081 status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
0082 directive_failed( status, "rtems_task_start of TA1" );
0083
0084 status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
0085 directive_failed( status, "rtems_task_start of TA2" );
0086
0087 Timer_name[ 1 ] = rtems_build_name( 'T', 'M', '1', ' ' );
0088 Timer_name[ 2 ] = rtems_build_name( 'T', 'M', '2', ' ' );
0089 Timer_name[ 3 ] = rtems_build_name( 'T', 'M', '3', ' ' );
0090 Timer_name[ 4 ] = rtems_build_name( 'T', 'M', '4', ' ' );
0091 Timer_name[ 5 ] = rtems_build_name( 'T', 'M', '5', ' ' );
0092 Timer_name[ 6 ] = rtems_build_name( 'T', 'M', '6', ' ' );
0093
0094 status = rtems_timer_create( Timer_name[ 1 ], &Timer_id[ 1 ] );
0095 directive_failed( status, "rtems_timer_create of TM1" );
0096
0097 status = rtems_timer_create( Timer_name[ 2 ], &Timer_id[ 2 ] );
0098 directive_failed( status, "rtems_timer_create of TM2" );
0099
0100 status = rtems_timer_create( Timer_name[ 3 ], &Timer_id[ 3 ] );
0101 directive_failed( status, "rtems_timer_create of TM3" );
0102
0103 status = rtems_timer_create( Timer_name[ 4 ], &Timer_id[ 4 ] );
0104 directive_failed( status, "rtems_timer_create of TM4" );
0105
0106 status = rtems_timer_create( Timer_name[ 5 ], &Timer_id[ 5 ] );
0107 directive_failed( status, "rtems_timer_create of TM5" );
0108
0109 status = rtems_timer_create( Timer_name[ 6 ], &Timer_id[ 6 ] );
0110 directive_failed( status, "rtems_timer_create of TM6" );
0111
0112 rtems_task_exit();
0113 }