4.104.114.84.95
Last change
on this file since dd687d97 was
48bfd992,
checked in by Joel Sherrill <joel.sherrill@…>, on 11/30/99 at 19:58:02
|
Renamed shm.h to shm_driver.h to avoid conflicts with POSIX shm.h.
Renamed file shmsupp/intr.c in some BSPs to shmsupp/cause_intr.c to
avoid conflict with rtems/src/intr.c (Classic API Interrupt Manager).
|
-
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.OARcorp.com/rtems/license.html. |
---|
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.