4.104.114.84.95
Rev | Line | |
---|
[ac7d5ef0] | 1 | /* void Shm_Convert_packet( &packet ) |
---|
| 2 | * |
---|
| 3 | * This routine is the shared memory locked queue MPCI driver routine |
---|
| 4 | * used to convert the RTEMS's information in a packet from non-native |
---|
| 5 | * format to processor native format. |
---|
| 6 | * |
---|
| 7 | * Input parameters: |
---|
| 8 | * packet - pointer to a packet |
---|
| 9 | * |
---|
| 10 | * Output parameters: |
---|
| 11 | * *packet - packet in native format |
---|
| 12 | * |
---|
| 13 | * NOTE: Message buffers are not manipulated. |
---|
| 14 | * Endian conversion is currently the only conversion. |
---|
| 15 | * |
---|
[60b791ad] | 16 | * COPYRIGHT (c) 1989-1998. |
---|
[ac7d5ef0] | 17 | * On-Line Applications Research Corporation (OAR). |
---|
[03f2154e] | 18 | * Copyright assigned to U.S. Government, 1994. |
---|
[ac7d5ef0] | 19 | * |
---|
[98e4ebf5] | 20 | * The license and distribution terms for this file may be |
---|
| 21 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 22 | * http://www.OARcorp.com/rtems/license.html. |
---|
[ac7d5ef0] | 23 | * |
---|
| 24 | * $Id$ |
---|
| 25 | */ |
---|
| 26 | |
---|
| 27 | #include <rtems.h> |
---|
| 28 | #include "shm.h" |
---|
| 29 | |
---|
| 30 | void Shm_Convert_packet( |
---|
| 31 | rtems_packet_prefix *packet |
---|
| 32 | ) |
---|
| 33 | { |
---|
| 34 | rtems_unsigned32 *pkt, i; |
---|
| 35 | |
---|
| 36 | pkt = (rtems_unsigned32 *) packet; |
---|
| 37 | for ( i=RTEMS_MINIMUN_HETERO_CONVERSION ; i ; i--, pkt++ ) |
---|
| 38 | *pkt = CPU_swap_u32( *pkt ); |
---|
| 39 | |
---|
| 40 | for ( i=packet->to_convert ; i ; i--, pkt++ ) |
---|
| 41 | *pkt = CPU_swap_u32( *pkt ); |
---|
| 42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.