source: rtems/testsuites/mptests/mp09/sendmsg.c @ c32fb8f

4.104.114.84.95
Last change on this file since c32fb8f was d8e681e, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/30/04 at 11:18:29

2004-03-30 Ralf Corsepius <ralf_corsepius@…>

  • mp02/task1.c, mp03/system.h, mp03/task1.c, mp04/task1.c, mp05/system.h, mp06/task1.c, mp07/task1.c, mp08/task1.c, mp09/recvmsg.c, mp09/sendmsg.c, mp09/task1.c, mp10/task1.c, mp11/init.c, mp12/init.c, mp13/task1.c, mp14/evtask1.c, mp14/evtmtask.c, mp14/init.c, mp14/msgtask1.c, mp14/pttask1.c, mp14/smtask1.c, mp14/system.h: Convert to using c99 fixed size types.
  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[ac7d5ef0]1/*  Send_messages
2 *
3 *  This routine sends a series of three messages.
4 *  an error condition.
5 *
6 *  Input parameters:  NONE
7 *
8 *  Output parameters:  NONE
9 *
[08311cc3]10 *  COPYRIGHT (c) 1989-1999.
[ac7d5ef0]11 *  On-Line Applications Research Corporation (OAR).
12 *
[98e4ebf5]13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
[d7a0857]15 *  http://www.rtems.com/license/LICENSE.
[ac7d5ef0]16 *
[3235ad9]17 *  $Id$
[ac7d5ef0]18 */
19
20#include "system.h"
21
22void Send_messages()
23{
24  rtems_status_code status;
[d8e681e]25  uint32_t    broadcast_count;
[ac7d5ef0]26
27  puts_nocr( "rtems_message_queue_send: " );
28  puts( buffer1 );
29
[4b374f36]30  status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1, 16 );
[ac7d5ef0]31  directive_failed( status, "rtems_message_queue_send" );
32
33  puts( "Delaying for a second" );
34  status = rtems_task_wake_after( TICKS_PER_SECOND );
35  directive_failed( status, "rtems_task_wake_after" );
36
37  puts_nocr( "rtems_message_queue_urgent: " );
38  puts( buffer2 );
[4b374f36]39  status = rtems_message_queue_urgent( Queue_id[ 1 ], (long (*)[4])buffer2, 16 );
[ac7d5ef0]40  directive_failed( status, "rtems_message_queue_urgent" );
41
42  puts( "Delaying for a second" );
43  status = rtems_task_wake_after( TICKS_PER_SECOND );
44  directive_failed( status, "rtems_task_wake_after" );
45
46  puts_nocr( "rtems_message_queue_broadcast: " );
47  puts( buffer3 );
48  status = rtems_message_queue_broadcast(
49    Queue_id[ 1 ],
50    (long (*)[4])buffer3,
[4b374f36]51    16,
[ac7d5ef0]52    &broadcast_count
53  );
54  directive_failed( status, "rtems_message_queue_broadcast" );
55
56  puts( "Delaying for a second" );
57  status = rtems_task_wake_after( TICKS_PER_SECOND );
58  directive_failed( status, "rtems_task_wake_after" );
59}
Note: See TracBrowser for help on using the repository browser.