From 4b374f36e7172d59d6d8c252973c1ef65637ecbb Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 17 Aug 1995 19:36:43 +0000 Subject: maximum number of messages removed and include statement cleanup --- testsuites/mptests/mp09/init.c | 5 +++-- testsuites/mptests/mp09/node1/mp09.scn | 1 + testsuites/mptests/mp09/node2/mp09.scn | 6 +++--- testsuites/mptests/mp09/recvmsg.c | 4 +++- testsuites/mptests/mp09/sendmsg.c | 7 ++++--- testsuites/mptests/mp09/system.h | 5 ++--- testsuites/mptests/mp09/task1.c | 10 ++++++---- 7 files changed, 22 insertions(+), 16 deletions(-) (limited to 'testsuites/mptests/mp09') diff --git a/testsuites/mptests/mp09/init.c b/testsuites/mptests/mp09/init.c index bd19547cef..b63a4e0e88 100644 --- a/testsuites/mptests/mp09/init.c +++ b/testsuites/mptests/mp09/init.c @@ -19,7 +19,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * init.c,v 1.2 1995/05/31 17:03:11 joel Exp */ #include "system.h" @@ -49,7 +49,8 @@ rtems_task Init( status = rtems_message_queue_create( Queue_name[ 1 ], 3, - RTEMS_GLOBAL|RTEMS_LIMIT, + 16, + RTEMS_GLOBAL, &Queue_id[ 1 ] ); directive_failed( status, "rtems_message_queue_create" ); diff --git a/testsuites/mptests/mp09/node1/mp09.scn b/testsuites/mptests/mp09/node1/mp09.scn index 2b612e4746..74cf06904d 100644 --- a/testsuites/mptests/mp09/node1/mp09.scn +++ b/testsuites/mptests/mp09/node1/mp09.scn @@ -10,6 +10,7 @@ Receiving message ... Received : abcdefghijklmno Receiving message ... Received : ABCDEFGHIJKLMNO +Receiver delaying for a second rtems_message_queue_send: 123456789012345 Delaying for a second rtems_message_queue_urgent: abcdefghijklmno diff --git a/testsuites/mptests/mp09/node2/mp09.scn b/testsuites/mptests/mp09/node2/mp09.scn index 96708f7fe0..1bd17cecd9 100644 --- a/testsuites/mptests/mp09/node2/mp09.scn +++ b/testsuites/mptests/mp09/node2/mp09.scn @@ -16,12 +16,12 @@ Receiving message ... Received : abcdefghijklmno Receiving message ... Received : ABCDEFGHIJKLMNO +Receiver delaying for a second Flushing remote empty queue -00 messages were flushed on the remote queue +0 messages were flushed on the remote queue Send messages to be flushed from remote queue Flushing remote queue -01 messages were flushed on the remote queue +1 messages were flushed on the remote queue Waiting for message queue to be deleted - Global message queue deleted *** END OF TEST 9 *** diff --git a/testsuites/mptests/mp09/recvmsg.c b/testsuites/mptests/mp09/recvmsg.c index c3c1a8ef8b..7eff6f8af0 100644 --- a/testsuites/mptests/mp09/recvmsg.c +++ b/testsuites/mptests/mp09/recvmsg.c @@ -15,7 +15,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * recvmsg.c,v 1.2 1995/05/31 17:03:14 joel Exp */ #include "system.h" @@ -24,6 +24,7 @@ void Receive_messages() { rtems_status_code status; rtems_unsigned32 index; + rtems_unsigned32 size; char receive_buffer[16]; for ( index=1 ; index <=3 ; index++ ) { @@ -31,6 +32,7 @@ void Receive_messages() status = rtems_message_queue_receive( Queue_id[ 1 ], (long (*)[4])receive_buffer, + &size, RTEMS_DEFAULT_OPTIONS, RTEMS_NO_TIMEOUT ); diff --git a/testsuites/mptests/mp09/sendmsg.c b/testsuites/mptests/mp09/sendmsg.c index d800eb47cf..94e004dfdb 100644 --- a/testsuites/mptests/mp09/sendmsg.c +++ b/testsuites/mptests/mp09/sendmsg.c @@ -15,7 +15,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * sendmsg.c,v 1.2 1995/05/31 17:03:16 joel Exp */ #include "system.h" @@ -28,7 +28,7 @@ void Send_messages() puts_nocr( "rtems_message_queue_send: " ); puts( buffer1 ); - status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1 ); + status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1, 16 ); directive_failed( status, "rtems_message_queue_send" ); puts( "Delaying for a second" ); @@ -37,7 +37,7 @@ void Send_messages() puts_nocr( "rtems_message_queue_urgent: " ); puts( buffer2 ); - status = rtems_message_queue_urgent( Queue_id[ 1 ], (long (*)[4])buffer2 ); + status = rtems_message_queue_urgent( Queue_id[ 1 ], (long (*)[4])buffer2, 16 ); directive_failed( status, "rtems_message_queue_urgent" ); puts( "Delaying for a second" ); @@ -49,6 +49,7 @@ void Send_messages() status = rtems_message_queue_broadcast( Queue_id[ 1 ], (long (*)[4])buffer3, + 16, &broadcast_count ); directive_failed( status, "rtems_message_queue_broadcast" ); diff --git a/testsuites/mptests/mp09/system.h b/testsuites/mptests/mp09/system.h index aa2c6d17e4..8b834cda70 100644 --- a/testsuites/mptests/mp09/system.h +++ b/testsuites/mptests/mp09/system.h @@ -11,11 +11,10 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * system.h,v 1.2 1995/05/31 17:03:17 joel Exp */ -#include -#include "tmacros.h" +#include /* Miscellaneous */ diff --git a/testsuites/mptests/mp09/task1.c b/testsuites/mptests/mp09/task1.c index ece05592dd..cd6cb90041 100644 --- a/testsuites/mptests/mp09/task1.c +++ b/testsuites/mptests/mp09/task1.c @@ -16,7 +16,7 @@ * to the copyright license under the clause at DFARS 252.227-7013. This * notice must appear in all copies of this file and its derivatives. * - * $Id$ + * task1.c,v 1.2 1995/05/31 17:03:19 joel Exp */ #include "system.h" @@ -32,6 +32,7 @@ rtems_task Test_task( { rtems_status_code status; rtems_unsigned32 count; + rtems_unsigned32 size; char receive_buffer[16]; status = rtems_task_wake_after( TICKS_PER_SECOND ); @@ -64,21 +65,22 @@ rtems_task Test_task( puts( "Flushing remote empty queue" ); status = rtems_message_queue_flush( Queue_id[ 1 ], &count ); directive_failed( status, "rtems_message_queue_flush" ); - printf( "%02d messages were flushed on the remote queue\n", count ); + printf( "%d messages were flushed on the remote queue\n", count ); puts( "Send messages to be flushed from remote queue" ); - status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1 ); + status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1, 16 ); directive_failed( status, "rtems_message_queue_send" ); puts( "Flushing remote queue" ); status = rtems_message_queue_flush( Queue_id[ 1 ], &count ); directive_failed( status, "rtems_message_queue_flush" ); - printf( "%02d messages were flushed on the remote queue\n", count ); + printf( "%d messages were flushed on the remote queue\n", count ); puts( "Waiting for message queue to be deleted" ); status = rtems_message_queue_receive( Queue_id[ 1 ], (long (*)[4])receive_buffer, + &size, RTEMS_DEFAULT_OPTIONS, RTEMS_NO_TIMEOUT ); -- cgit v1.2.3