File indexing completed on 2025-05-11 08:24:35
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 #ifdef HAVE_CONFIG_H
0041 #include "config.h"
0042 #endif
0043
0044 #include "system.h"
0045
0046 static void create_and_start( uint32_t i )
0047 {
0048 rtems_status_code status;
0049 char str[30];
0050 char name[6];
0051
0052 sprintf(name, "TA%02" PRId32 " ", i);
0053
0054 Task_name[ i ] = rtems_build_name(
0055 name[0], name[1], name[2], name[3]
0056 );
0057
0058 status = rtems_task_create(
0059 Task_name[ i ],
0060 1,
0061 RTEMS_MINIMUM_STACK_SIZE,
0062 RTEMS_TIMESLICE,
0063 RTEMS_FLOATING_POINT,
0064 &Task_id[ i ]
0065 );
0066 sprintf(str,"rtems_task_create of %s", name);
0067 directive_failed( status, str );
0068
0069 status = rtems_task_start( Task_id[ i ], Task_3, i );
0070 sprintf(str, "rtems_task_start of %s", name);
0071 directive_failed( status, str);
0072 }
0073
0074 rtems_task Task_1(
0075 rtems_task_argument argument
0076 )
0077 {
0078 rtems_status_code status;
0079 char str[80];
0080 uint32_t i,j;
0081
0082 for(j=0; j<2; j++) {
0083
0084 for( i=3; i<TASK_COUNT; i++) {
0085 create_and_start(i);
0086 status = rtems_task_wake_after (TicksPerSecond * 5);
0087 directive_failed( status, "rtems_task_wake_after" );
0088 }
0089
0090 status = rtems_task_wake_after (TicksPerSecond * 10);
0091 directive_failed( status, "rtems_task_wake_after" );
0092
0093 for( i=3; i<TASK_COUNT; i++) {
0094 status = rtems_task_delete( Task_id[i] );
0095 sprintf(str, "task delete TA%02" PRId32 "", i);
0096 directive_failed( status, str );
0097 status = rtems_task_wake_after (TicksPerSecond * 5);
0098 directive_failed( status, "rtems_task_wake_after" );
0099 }
0100 }
0101
0102 TEST_END();
0103 rtems_test_exit( 0 );
0104 }