diff options
Diffstat (limited to 'testsuites/sptests/spsimplesched02')
-rw-r--r-- | testsuites/sptests/spsimplesched02/init.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/testsuites/sptests/spsimplesched02/init.c b/testsuites/sptests/spsimplesched02/init.c index 8b053b6917..d4faa7ad3d 100644 --- a/testsuites/sptests/spsimplesched02/init.c +++ b/testsuites/sptests/spsimplesched02/init.c @@ -21,6 +21,7 @@ void ObtainRelease(bool suspendIdle); /* * Keep the names and IDs in global variables so another task can use them. */ +rtems_id Idle_id; rtems_id Task_id[ 3 ]; /* array of task ids */ rtems_name Task_name[ 3 ]; /* array of task names */ rtems_name Semaphore_name[ 2 ]; @@ -48,7 +49,7 @@ void ObtainRelease( bool suspendIdle ) if (suspendIdle) { puts( "INIT - Suspend Idle Task"); - status = rtems_task_suspend( _Thread_Idle->Object.id ); + status = rtems_task_suspend( Idle_id ); directive_failed( status, "rtems_task_suspend idle" ); } @@ -62,7 +63,7 @@ void ObtainRelease( bool suspendIdle ) if (suspendIdle) { puts( "INIT - Resume Idle Task"); - status = rtems_task_resume( _Thread_Idle->Object.id ); + status = rtems_task_resume( Idle_id ); directive_failed( status, "rtems_task_resume idle" ); } } @@ -75,6 +76,14 @@ rtems_task Init( puts( "\n\n*** SIMPLE SCHEDULER 02 TEST ***" ); + status = _Objects_Name_to_id_u32( + &_Thread_Internal_information, + rtems_build_name( 'I', 'D', 'L', 'E' ), + RTEMS_SEARCH_LOCAL_NODE, + &Idle_id + ); + rtems_test_assert( status == RTEMS_SUCCESSFUL ); + /* * Create the semaphore. Then obtain and release the * semaphore with no other tasks running. |