From e3be6915989d79a8797b775974f501a359226319 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 27 May 2013 17:31:46 +0200 Subject: score: Remove idle field of Per_CPU_Control This field is unused except for special case simulator clock drivers. In these places use an alternative. Add and use _Thread_Set_global_exit_status() and _Thread_Get_global_exit_status(). --- testsuites/sptests/spsimplesched02/init.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'testsuites/sptests/spsimplesched02') 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. -- cgit v1.2.3