File indexing completed on 2025-05-11 08:24:49
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 #ifdef HAVE_CONFIG_H
0030 #include "config.h"
0031 #endif
0032
0033 #define CONFIGURE_INIT
0034 #include "system.h"
0035
0036 const char rtems_test_name[] = "SP TASK ERROR 01";
0037
0038 rtems_task Init(
0039 rtems_task_argument argument
0040 )
0041 {
0042 rtems_status_code status;
0043
0044 TEST_BEGIN();
0045
0046 Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
0047
0048 status = rtems_task_create(
0049 Task_name[ 2 ],
0050 1,
0051 RTEMS_MINIMUM_STACK_SIZE,
0052 RTEMS_DEFAULT_MODES,
0053 RTEMS_DEFAULT_ATTRIBUTES,
0054 &Task_id[ 2 ]
0055 );
0056 directive_failed( status, "rtems_task_create of TA2" );
0057 puts( "TA1 - rtems_task_create - TA2 created - RTEMS_SUCCESSFUL" );
0058
0059 puts( "TA1 - rtems_task_start - start TA2 - RTEMS_SUCCESSFUL" );
0060 status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
0061 directive_failed( status, "rtems_task_start of TA2" );
0062
0063 puts( "TA1 - rtems_task_wake_after - yield processor - RTEMS_SUCCESSFUL" );
0064 status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
0065 directive_failed( status, "rtems_task_wake_after (yield)" );
0066
0067 status = rtems_task_delete( Task_id[ 2 ] );
0068 fatal_directive_status(
0069 status,
0070 RTEMS_INVALID_ID,
0071 "rtems_task_delete after the task has been deleted"
0072 );
0073 puts( "TA1 - rtems_task_delete TA2 - already deleted RTEMS_INVALID_ID" );
0074
0075 TEST_END();
0076 }