[rtems commit] sptests/sp76: Check that the right task executes

Sebastian Huber sebh at rtems.org
Thu Feb 26 09:20:52 UTC 2015


Module:    rtems
Branch:    master
Commit:    bd1c92480a736348d27198be344c065b395e24b0
Changeset: http://git.rtems.org/rtems/commit/?id=bd1c92480a736348d27198be344c065b395e24b0

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb 26 10:19:38 2015 +0100

sptests/sp76: Check that the right task executes

---

 testsuites/sptests/sp76/init.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/testsuites/sptests/sp76/init.c b/testsuites/sptests/sp76/init.c
index f657364..daf55f1 100644
--- a/testsuites/sptests/sp76/init.c
+++ b/testsuites/sptests/sp76/init.c
@@ -15,11 +15,7 @@
 
 const char rtems_test_name[] = "SP 76";
 
-/* forward declarations to avoid warnings */
-rtems_task Init(rtems_task_argument argument);
-rtems_task Test_task(rtems_task_argument index);
-
-rtems_task Test_task(
+static rtems_task High_task(
   rtems_task_argument index
 )
 {
@@ -36,7 +32,14 @@ rtems_task Test_task(
   rtems_test_exit( 0 );
 }
 
-rtems_task Init(
+static rtems_task Equal_task(
+  rtems_task_argument index
+)
+{
+  rtems_test_assert( 0 );
+}
+
+static rtems_task Init(
   rtems_task_argument argument
 )
 {
@@ -65,7 +68,7 @@ rtems_task Init(
   );
   directive_failed( status, "create 1" );
 
-  status = rtems_task_start( id, Test_task, 1 );
+  status = rtems_task_start( id, High_task, 1 );
   directive_failed( status, "start 1" );
 
   puts( "Create TA2 at equal priority task" );
@@ -79,7 +82,7 @@ rtems_task Init(
   );
   directive_failed( status, "create 2" );
 
-  status = rtems_task_start( id, Test_task, 1 );
+  status = rtems_task_start( id, Equal_task, 1 );
   directive_failed( status, "start 2" );
 
   puts( "Yield to TA1" );




More information about the vc mailing list