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
|
Rev | Line | |
---|
[ac7d5ef0] | 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 | * |
---|
[03f2154e] | 14 | * COPYRIGHT (c) 1989-1997. |
---|
[ac7d5ef0] | 15 | * On-Line Applications Research Corporation (OAR). |
---|
[03f2154e] | 16 | * Copyright assigned to U.S. Government, 1994. |
---|
[ac7d5ef0] | 17 | * |
---|
[98e4ebf5] | 18 | * The license and distribution terms for this file may be |
---|
| 19 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 20 | * http://www.OARcorp.com/rtems/license.html. |
---|
[ac7d5ef0] | 21 | * |
---|
| 22 | * $Id$ |
---|
| 23 | */ |
---|
| 24 | |
---|
| 25 | #include <rtems.h> |
---|
| 26 | #include "shm.h" |
---|
| 27 | |
---|
| 28 | rtems_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.