I think the use of _Objects_Name_to_id_u32 should be
calling rtems_task_ident.
On 5/29/2013 10:31 AM, Sebastian Huber wrote:
diff --git a/testsuites/sptests/spsimplesched02/init.c
b/testsuites/sptests/spsimplesched02/init.c
index 8b053b6..d4faa7a 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.
--
Joel Sherrill, Ph.D. Director of Research & Development
[email protected] On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
_______________________________________________
rtems-devel mailing list
[email protected]
http://www.rtems.org/mailman/listinfo/rtems-devel