source: rtems/c/src/lib/libbsp/shmdr/receive.c @ f7fa7d7

4.104.114.84.95
Last change on this file since f7fa7d7 was 98e4ebf5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/97 at 15:45:54

Fixed typo in the pointer to the license terms.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*  Shm_Receive_packet
2 *
3 *  This routine is the shared memory locked queue MPCI driver routine
4 *  used to obtain a packet containing a message from this node's
5 *  receive queue.
6 *
7 *  Input parameters:
8 *    packet         - address of a pointer to a packet
9 *
10 *  Output parameters:
11 *    *(rpb->packet) - pointer to packet
12 *                     NULL if no packet currently available
13 *
14 *  COPYRIGHT (c) 1989-1997.
15 *  On-Line Applications Research Corporation (OAR).
16 *  Copyright assigned to U.S. Government, 1994.
17 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.OARcorp.com/rtems/license.html.
21 *
22 *  $Id$
23 */
24
25#include <rtems.h>
26#include "shm.h"
27
28rtems_mpci_entry Shm_Receive_packet(
29  rtems_packet_prefix **packet
30)
31{
32  Shm_Envelope_control *ecb;
33
34  ecb = Shm_Locked_queue_Get( Shm_Local_receive_queue );
35  if ( ecb ) {
36    *(packet) = Shm_Envelope_control_to_packet_prefix_pointer( ecb );
37    if ( ecb->Preamble.endian != Shm_Configuration->format )
38      Shm_Convert_packet( *packet );
39    Shm_Receive_message_count++;
40  } else {
41    *(packet) = NULL;
42    Shm_Null_message_count++;
43  }
44}
Note: See TracBrowser for help on using the repository browser.