diff options
Diffstat (limited to 'testsuites/sptests/sp12')
-rw-r--r-- | testsuites/sptests/sp12/init.c | 12 | ||||
-rw-r--r-- | testsuites/sptests/sp12/pridrv.c | 8 | ||||
-rw-r--r-- | testsuites/sptests/sp12/pritask.c | 4 | ||||
-rw-r--r-- | testsuites/sptests/sp12/system.h | 4 |
4 files changed, 15 insertions, 13 deletions
diff --git a/testsuites/sptests/sp12/init.c b/testsuites/sptests/sp12/init.c index 5a59e5a0bb..f68e9d477e 100644 --- a/testsuites/sptests/sp12/init.c +++ b/testsuites/sptests/sp12/init.c @@ -11,7 +11,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -79,14 +79,14 @@ rtems_task Init( Priority_test_driver( 0 ); puts( "INIT - Backward priority queue test" ); - Priority_test_driver( 32 ); + Priority_test_driver( (RTEMS_MAXIMUM_PRIORITY / 2) + 1 ); rtems_test_pause(); puts( "INIT - Binary Semaphore and Priority Inheritance Test" ); status = rtems_semaphore_delete( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_delete of SM2" ); + directive_failed( status, "rtems_semaphore_delete of SM2 #1" ); puts( "INIT - rtems_semaphore_create - allocated binary semaphore" ); status = rtems_semaphore_create( @@ -104,7 +104,7 @@ rtems_test_pause(); puts( "INIT - rtems_semaphore_delete - allocated binary semaphore" ); status = rtems_semaphore_delete( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_delete of SM2" ); + directive_failed( status, "rtems_semaphore_delete of SM2 #2" ); status = rtems_semaphore_create( Semaphore_name[ 2 ], @@ -115,12 +115,12 @@ rtems_test_pause(); ); directive_failed( status, "rtems_semaphore_create of priority inherit SM2" ); - Priority_test_driver( 64 ); + Priority_test_driver( PRIORITY_INHERIT_BASE_PRIORITY ); rtems_test_pause(); status = rtems_semaphore_delete( Semaphore_id[ 2 ] ); - directive_failed( status, "rtems_semaphore_delete of SM2" ); + directive_failed( status, "rtems_semaphore_delete of SM2 #3" ); status = rtems_semaphore_create( Semaphore_name[ 2 ], diff --git a/testsuites/sptests/sp12/pridrv.c b/testsuites/sptests/sp12/pridrv.c index bcf04f9373..1bd4491909 100644 --- a/testsuites/sptests/sp12/pridrv.c +++ b/testsuites/sptests/sp12/pridrv.c @@ -11,7 +11,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -28,7 +28,7 @@ void Priority_test_driver( ) { rtems_task_priority previous_priority; - uint32_t index; + uint32_t index; rtems_status_code status; for ( index = 1 ; index <= 5 ; index++ ) { @@ -76,7 +76,7 @@ void Priority_test_driver( status = rtems_task_wake_after( TICKS_PER_SECOND ); directive_failed( status, "rtems_task_wake_after loop" ); - if ( priority_base == 64 ) { + if ( priority_base == PRIORITY_INHERIT_BASE_PRIORITY ) { if ( index == 4 ) { status = rtems_task_set_priority( Priority_task_id[ 5 ], @@ -110,7 +110,7 @@ void Priority_test_driver( } } - if ( priority_base == 64 ) { + if ( priority_base == PRIORITY_INHERIT_BASE_PRIORITY ) { puts( "PDRV - rtems_task_resume - PRI5" ); status = rtems_task_resume( Priority_task_id[ 5 ] ); directive_failed( status, "rtems_task_resume" ); diff --git a/testsuites/sptests/sp12/pritask.c b/testsuites/sptests/sp12/pritask.c index 8aa3a0aea4..bd20f181eb 100644 --- a/testsuites/sptests/sp12/pritask.c +++ b/testsuites/sptests/sp12/pritask.c @@ -7,7 +7,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -46,7 +46,7 @@ rtems_task Priority_task( ); directive_failed( status, "rtems_semaphore_obtain of SM2" ); - if ( its_priority < 64 ) { + if ( its_priority < PRIORITY_INHERIT_BASE_PRIORITY ) { printf( "PRI%d - WHY AM I HERE? (pri=%d)", its_index, its_priority ); rtems_test_exit( 0 ); } diff --git a/testsuites/sptests/sp12/system.h b/testsuites/sptests/sp12/system.h index 38dc80193f..a57e71e381 100644 --- a/testsuites/sptests/sp12/system.h +++ b/testsuites/sptests/sp12/system.h @@ -3,7 +3,7 @@ * This include file contains information that is included in every * function in the test set. * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -15,6 +15,8 @@ #include <tmacros.h> +#define PRIORITY_INHERIT_BASE_PRIORITY 5 + /* functions */ rtems_task Init( |