4.104.114.84.95
Last change
on this file since 57d673c was
4e89a12,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:56:25
|
2003-09-04 Joel Sherrill <joel@…>
- addlq.c, cnvpkt.c, dump.c, fatal.c, getlq.c, getpkt.c, init.c,
initlq.c, intr.c, mpci.h, mpisr.c, poll.c, receive.c, retpkt.c,
send.c, setckvec.c, shm_driver.h: URL for license changed.
|
-
Property mode set to
100644
|
File size:
1.1 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-1999. |
---|
15 | * On-Line Applications Research Corporation (OAR). |
---|
16 | * |
---|
17 | * The license and distribution terms for this file may be |
---|
18 | * found in the file LICENSE in this distribution or at |
---|
19 | * http://www.rtems.com/license/LICENSE. |
---|
20 | * |
---|
21 | * $Id$ |
---|
22 | */ |
---|
23 | |
---|
24 | #include <rtems.h> |
---|
25 | #include "shm_driver.h" |
---|
26 | |
---|
27 | rtems_mpci_entry Shm_Receive_packet( |
---|
28 | rtems_packet_prefix **packet |
---|
29 | ) |
---|
30 | { |
---|
31 | Shm_Envelope_control *ecb; |
---|
32 | |
---|
33 | ecb = Shm_Locked_queue_Get( Shm_Local_receive_queue ); |
---|
34 | if ( ecb ) { |
---|
35 | *(packet) = Shm_Envelope_control_to_packet_prefix_pointer( ecb ); |
---|
36 | if ( ecb->Preamble.endian != Shm_Configuration->format ) |
---|
37 | Shm_Convert_packet( *packet ); |
---|
38 | Shm_Receive_message_count++; |
---|
39 | } else { |
---|
40 | *(packet) = NULL; |
---|
41 | Shm_Null_message_count++; |
---|
42 | } |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.