diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-27 17:31:46 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-31 15:20:31 +0200 |
commit | e3be6915989d79a8797b775974f501a359226319 (patch) | |
tree | ba03a5fdc008b33da067bb9837f8b6c6d82317e0 /testsuites/sptests | |
parent | bsps: Use _Objects_Information_table (diff) | |
download | rtems-e3be6915989d79a8797b775974f501a359226319.tar.bz2 |
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().
Diffstat (limited to 'testsuites/sptests')
-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. |