Modifications from Tony Bennett accepted to tune this test a little.

This commit is contained in:
Joel Sherrill
1995-09-19 21:44:33 +00:00
parent d434b8d686
commit 2122a0b7f4
8 changed files with 44 additions and 22 deletions

View File

@@ -54,7 +54,8 @@ rtems_task Test_task(
if ( status == RTEMS_SUCCESSFUL ) if ( status == RTEMS_SUCCESSFUL )
break; break;
puts( "rtems_task_ident" ); puts( "rtems_task_ident FAILED!!" );
rtems_task_wake_after(2);
} }
if ( Multiprocessing_configuration.node == 1 ) { if ( Multiprocessing_configuration.node == 1 ) {

View File

@@ -49,6 +49,7 @@ rtems_task Message_queue_task(
if ( status == RTEMS_SUCCESSFUL ) if ( status == RTEMS_SUCCESSFUL )
break; break;
puts( "rtems_message_queue_ident FAILED!!" ); puts( "rtems_message_queue_ident FAILED!!" );
rtems_task_wake_after(2);
} }
if ( Multiprocessing_configuration.node == 1 ) { if ( Multiprocessing_configuration.node == 1 ) {

View File

@@ -29,6 +29,7 @@ rtems_task Partition_task(
{ {
rtems_unsigned32 count; rtems_unsigned32 count;
rtems_status_code status; rtems_status_code status;
rtems_unsigned32 yield_count;
void *buffer; void *buffer;
puts( "Getting ID of partition" ); puts( "Getting ID of partition" );
@@ -43,8 +44,11 @@ rtems_task Partition_task(
break; break;
puts( "rtems_partition_ident FAILED!!" ); puts( "rtems_partition_ident FAILED!!" );
rtems_task_wake_after(2);
} }
yield_count = 100;
while ( Stop_Test == FALSE ) { while ( Stop_Test == FALSE ) {
for ( count=PARTITION_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) { for ( count=PARTITION_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer ); status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer );
@@ -53,9 +57,11 @@ rtems_task Partition_task(
status = rtems_partition_return_buffer( Partition_id[ 1 ], buffer ); status = rtems_partition_return_buffer( Partition_id[ 1 ], buffer );
directive_failed( status, "rtems_partition_return_buffer" ); directive_failed( status, "rtems_partition_return_buffer" );
if ( Multiprocessing_configuration.node == 1 ) { if (Stop_Test == FALSE)
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) {
status = rtems_task_wake_after( 1 );
directive_failed( status, "rtems_task_wake_after" ); directive_failed( status, "rtems_task_wake_after" );
yield_count = 100;
} }
} }
put_dot( 'p' ); put_dot( 'p' );

View File

@@ -40,11 +40,13 @@ rtems_task Semaphore_task(
if ( status == RTEMS_SUCCESSFUL ) if ( status == RTEMS_SUCCESSFUL )
break; break;
puts( "rtems_semaphore_ident FAILED!!" ); puts( "rtems_semaphore_ident FAILED!!" );
rtems_task_wake_after(2);
} }
while ( Stop_Test == FALSE ) {
yield_count = 100; yield_count = 100;
while ( Stop_Test == FALSE ) {
for ( count=SEMAPHORE_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) { for ( count=SEMAPHORE_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
status = rtems_semaphore_obtain( status = rtems_semaphore_obtain(
Semaphore_id[ 1 ], Semaphore_id[ 1 ],
@@ -56,6 +58,7 @@ rtems_task Semaphore_task(
status = rtems_semaphore_release( Semaphore_id[ 1 ] ); status = rtems_semaphore_release( Semaphore_id[ 1 ] );
directive_failed( status, "rtems_semaphore_release" ); directive_failed( status, "rtems_semaphore_release" );
if ( Stop_Test == FALSE )
if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) { if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) {
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
directive_failed( status, "rtems_task_wake_after" ); directive_failed( status, "rtems_task_wake_after" );

View File

@@ -54,7 +54,8 @@ rtems_task Test_task(
if ( status == RTEMS_SUCCESSFUL ) if ( status == RTEMS_SUCCESSFUL )
break; break;
puts( "rtems_task_ident" ); puts( "rtems_task_ident FAILED!!" );
rtems_task_wake_after(2);
} }
if ( Multiprocessing_configuration.node == 1 ) { if ( Multiprocessing_configuration.node == 1 ) {

View File

@@ -49,6 +49,7 @@ rtems_task Message_queue_task(
if ( status == RTEMS_SUCCESSFUL ) if ( status == RTEMS_SUCCESSFUL )
break; break;
puts( "rtems_message_queue_ident FAILED!!" ); puts( "rtems_message_queue_ident FAILED!!" );
rtems_task_wake_after(2);
} }
if ( Multiprocessing_configuration.node == 1 ) { if ( Multiprocessing_configuration.node == 1 ) {

View File

@@ -29,6 +29,7 @@ rtems_task Partition_task(
{ {
rtems_unsigned32 count; rtems_unsigned32 count;
rtems_status_code status; rtems_status_code status;
rtems_unsigned32 yield_count;
void *buffer; void *buffer;
puts( "Getting ID of partition" ); puts( "Getting ID of partition" );
@@ -43,8 +44,11 @@ rtems_task Partition_task(
break; break;
puts( "rtems_partition_ident FAILED!!" ); puts( "rtems_partition_ident FAILED!!" );
rtems_task_wake_after(2);
} }
yield_count = 100;
while ( Stop_Test == FALSE ) { while ( Stop_Test == FALSE ) {
for ( count=PARTITION_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) { for ( count=PARTITION_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer ); status = rtems_partition_get_buffer( Partition_id[ 1 ], &buffer );
@@ -53,9 +57,11 @@ rtems_task Partition_task(
status = rtems_partition_return_buffer( Partition_id[ 1 ], buffer ); status = rtems_partition_return_buffer( Partition_id[ 1 ], buffer );
directive_failed( status, "rtems_partition_return_buffer" ); directive_failed( status, "rtems_partition_return_buffer" );
if ( Multiprocessing_configuration.node == 1 ) { if (Stop_Test == FALSE)
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) {
status = rtems_task_wake_after( 1 );
directive_failed( status, "rtems_task_wake_after" ); directive_failed( status, "rtems_task_wake_after" );
yield_count = 100;
} }
} }
put_dot( 'p' ); put_dot( 'p' );

View File

@@ -40,11 +40,13 @@ rtems_task Semaphore_task(
if ( status == RTEMS_SUCCESSFUL ) if ( status == RTEMS_SUCCESSFUL )
break; break;
puts( "rtems_semaphore_ident FAILED!!" ); puts( "rtems_semaphore_ident FAILED!!" );
rtems_task_wake_after(2);
} }
while ( Stop_Test == FALSE ) {
yield_count = 100; yield_count = 100;
while ( Stop_Test == FALSE ) {
for ( count=SEMAPHORE_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) { for ( count=SEMAPHORE_DOT_COUNT ; Stop_Test == FALSE && count ; count-- ) {
status = rtems_semaphore_obtain( status = rtems_semaphore_obtain(
Semaphore_id[ 1 ], Semaphore_id[ 1 ],
@@ -56,6 +58,7 @@ rtems_task Semaphore_task(
status = rtems_semaphore_release( Semaphore_id[ 1 ] ); status = rtems_semaphore_release( Semaphore_id[ 1 ] );
directive_failed( status, "rtems_semaphore_release" ); directive_failed( status, "rtems_semaphore_release" );
if ( Stop_Test == FALSE )
if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) { if ( Multiprocessing_configuration.node == 1 && --yield_count == 0 ) {
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
directive_failed( status, "rtems_task_wake_after" ); directive_failed( status, "rtems_task_wake_after" );