summaryrefslogtreecommitdiffstats
path: root/c/src/libchip
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2016-04-21 20:12:46 -0500
committerJoel Sherrill <joel@rtems.org>2016-06-16 09:03:22 -0500
commit381b120acc46f714adc22a696e1487f7d1e4de4d (patch)
tree73ae593d8d9a7ac28d7d339e419635af9880c410 /c/src/libchip
parentlibchip/shmdr/poll.c: Fix warning and clean up (diff)
downloadrtems-381b120acc46f714adc22a696e1487f7d1e4de4d.tar.bz2
libchip/shmdr/send.c: Fix warning and clean up
Diffstat (limited to 'c/src/libchip')
-rw-r--r--c/src/libchip/shmdr/send.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/c/src/libchip/shmdr/send.c b/c/src/libchip/shmdr/send.c
index 8f7a4226b6..c3ac7d51c2 100644
--- a/c/src/libchip/shmdr/send.c
+++ b/c/src/libchip/shmdr/send.c
@@ -1,17 +1,9 @@
-/* Shm_Send_packet
- *
- * This routine is the shared memory driver locked queue write
- * MPCI driver routine. This routine sends the specified packet
- * to the destination specified by "node". A "node" value of
- * zero designates that this packet is to be broadcasted.
- *
- * Input parameters:
- * node - destination of this packet (0 = broadcast)
- * packet - address of packet
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
+/**
+ * @file
+ */
+
+/*
+ * COPYRIGHT (c) 1989-1999, 2016.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -26,6 +18,17 @@ struct pkt_cpy {
uint32_t packet[MAX_PACKET_SIZE/4];
};
+/**
+ * This routine is the shared memory driver locked queue write
+ * MPCI driver routine. This routine sends the specified packet
+ * to the destination specified by "node". A "node" value of
+ * zero designates that this packet is to be broadcasted.
+ *
+ * @param node is the destination of this packet (0 = broadcast)
+ * @param packet is the address of packet
+ *
+ * @return NONE
+ */
rtems_mpci_entry Shm_Send_packet(
uint32_t node,
rtems_packet_prefix *packet
@@ -44,11 +47,14 @@ rtems_mpci_entry Shm_Send_packet(
else {
for( nnum = SHM_FIRST_NODE ; nnum <= SHM_MAXIMUM_NODES ; nnum++ )
if ( _Configuration_MP_table->node != nnum ) {
+ struct pkt_cpy *pkt;
+
tmp_ecb = Shm_Allocate_envelope();
if ( !tmp_ecb )
rtems_fatal_error_occurred( SHM_NO_FREE_PKTS );
Shm_Build_preamble( tmp_ecb, nnum );
- *((struct pkt_cpy *)tmp_ecb->packet) = *((struct pkt_cpy *)packet);
+ pkt = (struct pkt_cpy *)tmp_ecb->packet;
+ *pkt = *((struct pkt_cpy *)packet);
Shm_Build_postamble( tmp_ecb );
Shm_Append_to_receive_queue( nnum, tmp_ecb );
(*Shm_Configuration->cause_intr)( nnum );