OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [tests/] [mptests/] [mp09/] [sendmsg.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 158 chris
/*  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
 *
10
 *  COPYRIGHT (c) 1989-1999.
11
 *  On-Line Applications Research Corporation (OAR).
12
 *
13
 *  The license and distribution terms for this file may be
14
 *  found in the file LICENSE in this distribution or at
15
 *  http://www.OARcorp.com/rtems/license.html.
16
 *
17 208 chris
 *  $Id: sendmsg.c,v 1.2 2001-09-27 12:02:21 chris Exp $
18 158 chris
 */
19
 
20
#include "system.h"
21
 
22
void Send_messages()
23
{
24
  rtems_status_code status;
25
  rtems_unsigned32  broadcast_count;
26
 
27
  puts_nocr( "rtems_message_queue_send: " );
28
  puts( buffer1 );
29
 
30
  status = rtems_message_queue_send( Queue_id[ 1 ], (long (*)[4])buffer1, 16 );
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 );
39
  status = rtems_message_queue_urgent( Queue_id[ 1 ], (long (*)[4])buffer2, 16 );
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,
51
    16,
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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.