summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/lib/libbsp/a29k/portsw/shmsupp/addrconv.c2
-rw-r--r--c/src/lib/libbsp/a29k/portsw/shmsupp/getcfg.c2
-rw-r--r--c/src/lib/libbsp/a29k/portsw/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/a29k/portsw/shmsupp/mpisr.c2
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.in2
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c2
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/cause_intr.c (renamed from c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c)2
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c2
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c2
-rw-r--r--c/src/lib/libbsp/i960/cvme961/shmsupp/addrconv.c2
-rw-r--r--c/src/lib/libbsp/i960/cvme961/shmsupp/getcfg.c2
-rw-r--r--c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/i960/cvme961/shmsupp/mpisr.c2
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c2
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/shmsupp/getcfg.c2
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/i960/rxgen960/shmsupp/mpisr.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/shmsupp/addrconv.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/shmsupp/getcfg.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme136/shmsupp/mpisr.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/shmsupp/addrconv.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/m68k/mvme147s/shmsupp/mpisr.c2
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/addrconv.c2
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/getcfg.c2
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/mpisr.c2
-rw-r--r--c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c2
-rw-r--r--c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c2
-rw-r--r--c/src/lib/libbsp/powerpc/psim/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/powerpc/psim/shmsupp/mpisr.c2
-rw-r--r--c/src/lib/libbsp/shmdr/Makefile.in2
-rw-r--r--c/src/lib/libbsp/shmdr/addlq.c2
-rw-r--r--c/src/lib/libbsp/shmdr/cnvpkt.c2
-rw-r--r--c/src/lib/libbsp/shmdr/dump.c2
-rw-r--r--c/src/lib/libbsp/shmdr/fatal.c2
-rw-r--r--c/src/lib/libbsp/shmdr/getlq.c2
-rw-r--r--c/src/lib/libbsp/shmdr/getpkt.c2
-rw-r--r--c/src/lib/libbsp/shmdr/init.c2
-rw-r--r--c/src/lib/libbsp/shmdr/initlq.c2
-rw-r--r--c/src/lib/libbsp/shmdr/intr.c2
-rw-r--r--c/src/lib/libbsp/shmdr/mpci.h4
-rw-r--r--c/src/lib/libbsp/shmdr/mpisr.c2
-rw-r--r--c/src/lib/libbsp/shmdr/poll.c2
-rw-r--r--c/src/lib/libbsp/shmdr/receive.c2
-rw-r--r--c/src/lib/libbsp/shmdr/retpkt.c2
-rw-r--r--c/src/lib/libbsp/shmdr/send.c2
-rw-r--r--c/src/lib/libbsp/shmdr/setckvec.c2
-rw-r--r--c/src/lib/libbsp/shmdr/shm.h541
-rw-r--r--c/src/lib/libbsp/shmdr/shm_driver.h4
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/Makefile.in2
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/addrconv.c2
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/cause_intr.c (renamed from c/src/lib/libbsp/unix/posix/shmsupp/intr.c)2
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c2
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/lock.c2
-rw-r--r--c/src/lib/libbsp/unix/posix/shmsupp/mpisr.c2
-rw-r--r--c/src/lib/libbsp/unix/posix/wrapup/Makefile.in2
-rw-r--r--c/src/libchip/shmdr/addlq.c2
-rw-r--r--c/src/libchip/shmdr/cnvpkt.c2
-rw-r--r--c/src/libchip/shmdr/dump.c2
-rw-r--r--c/src/libchip/shmdr/fatal.c2
-rw-r--r--c/src/libchip/shmdr/getlq.c2
-rw-r--r--c/src/libchip/shmdr/getpkt.c2
-rw-r--r--c/src/libchip/shmdr/init.c2
-rw-r--r--c/src/libchip/shmdr/initlq.c2
-rw-r--r--c/src/libchip/shmdr/intr.c2
-rw-r--r--c/src/libchip/shmdr/mpci.h4
-rw-r--r--c/src/libchip/shmdr/mpisr.c2
-rw-r--r--c/src/libchip/shmdr/poll.c2
-rw-r--r--c/src/libchip/shmdr/receive.c2
-rw-r--r--c/src/libchip/shmdr/retpkt.c2
-rw-r--r--c/src/libchip/shmdr/send.c2
-rw-r--r--c/src/libchip/shmdr/setckvec.c2
-rw-r--r--c/src/libchip/shmdr/shm_driver.h4
77 files changed, 80 insertions, 621 deletions
diff --git a/c/src/lib/libbsp/a29k/portsw/shmsupp/addrconv.c b/c/src/lib/libbsp/a29k/portsw/shmsupp/addrconv.c
index ff610cd3c7..13a5511306 100644
--- a/c/src/lib/libbsp/a29k/portsw/shmsupp/addrconv.c
+++ b/c/src/lib/libbsp/a29k/portsw/shmsupp/addrconv.c
@@ -20,7 +20,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
#ifndef lint
static char _sccsid[] = "@(#)addrconv.c 04/08/96 1.1\n";
diff --git a/c/src/lib/libbsp/a29k/portsw/shmsupp/getcfg.c b/c/src/lib/libbsp/a29k/portsw/shmsupp/getcfg.c
index df6e43d4f5..2a681cdebf 100644
--- a/c/src/lib/libbsp/a29k/portsw/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/a29k/portsw/shmsupp/getcfg.c
@@ -33,7 +33,7 @@ XXX: FIX THE COMMENTS BELOW WHEN THE CPU IS KNOWN
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
#ifndef lint
static char _sccsid[] = "@(#)getcfg.c 04/08/96 1.1\n";
diff --git a/c/src/lib/libbsp/a29k/portsw/shmsupp/lock.c b/c/src/lib/libbsp/a29k/portsw/shmsupp/lock.c
index abb2af20fa..3a99179e57 100644
--- a/c/src/lib/libbsp/a29k/portsw/shmsupp/lock.c
+++ b/c/src/lib/libbsp/a29k/portsw/shmsupp/lock.c
@@ -18,7 +18,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
#ifndef lint
static char _sccsid[] = "@(#)lock.c 04/08/96 1.1\n";
diff --git a/c/src/lib/libbsp/a29k/portsw/shmsupp/mpisr.c b/c/src/lib/libbsp/a29k/portsw/shmsupp/mpisr.c
index 568a480722..d76b60fd9d 100644
--- a/c/src/lib/libbsp/a29k/portsw/shmsupp/mpisr.c
+++ b/c/src/lib/libbsp/a29k/portsw/shmsupp/mpisr.c
@@ -12,7 +12,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
#ifndef lint
static char _sccsid[] = "@(#)mpisr.c 04/08/96 1.1\n";
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.in b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.in
index acef5321df..941a07d48d 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.in
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/Makefile.in
@@ -16,7 +16,7 @@ VPATH = @srcdir@
PGM = ${ARCH}/shmsupp.rel
# C source names, if any, go here -- minus the .c
-C_PIECES = addrconv getcfg intr lock mpisr
+C_PIECES = addrconv getcfg cause_intr lock mpisr
C_FILES = $(C_PIECES:%=%.c)
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c
index e0d74544ad..49a70be604 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/addrconv.c
@@ -19,7 +19,7 @@
*/
#include <bsp.h>
-#include <shm.h>
+shm_driverinclude <shm_driver.h>
void *Shm_Convert_address(
void *address
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/cause_intr.c
index 7ea7934e47..4320900d1b 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/cause_intr.c
@@ -23,7 +23,7 @@
#include <rtems.h>
#include <rtems/error.h>
-#include <shm.h>
+#include <shm_driver.h>
void Shm_Cause_interrupt_pxfl(
rtems_unsigned32 node
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c
index 897d5af8e6..f1f4adfe4e 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c
@@ -35,7 +35,7 @@
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
#define INTERRUPT 0 /* can be interrupt or polling */
#define POLLING 1
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c
index e682a18397..a150c1d3be 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/lock.c
@@ -17,7 +17,7 @@
*/
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
/*
* Shm_Initialize_lock
diff --git a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c
index 48da668b21..d962221f0d 100644
--- a/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c
+++ b/c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/mpisr.c
@@ -18,7 +18,7 @@
*/
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
void Shm_setvec( void )
{
diff --git a/c/src/lib/libbsp/i960/cvme961/shmsupp/addrconv.c b/c/src/lib/libbsp/i960/cvme961/shmsupp/addrconv.c
index 953136ede9..5b7f4ec91b 100644
--- a/c/src/lib/libbsp/i960/cvme961/shmsupp/addrconv.c
+++ b/c/src/lib/libbsp/i960/cvme961/shmsupp/addrconv.c
@@ -22,7 +22,7 @@
#include <rtems.h>
#include <bsp.h>
-#include "shm.h"
+#include "shm_driver.h"
void *Shm_Convert_address(
void *address
diff --git a/c/src/lib/libbsp/i960/cvme961/shmsupp/getcfg.c b/c/src/lib/libbsp/i960/cvme961/shmsupp/getcfg.c
index cb1e7df96c..7aa3b9698f 100644
--- a/c/src/lib/libbsp/i960/cvme961/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/i960/cvme961/shmsupp/getcfg.c
@@ -42,7 +42,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
#define USE_ONBOARD_RAM 0 /* use onboard (1) or VME RAM */
/* for SHM communications */
diff --git a/c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c b/c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c
index 95d31254a3..a0fc5af95d 100644
--- a/c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c
+++ b/c/src/lib/libbsp/i960/cvme961/shmsupp/lock.c
@@ -18,7 +18,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
/*
* Shm_Initialize_lock
diff --git a/c/src/lib/libbsp/i960/cvme961/shmsupp/mpisr.c b/c/src/lib/libbsp/i960/cvme961/shmsupp/mpisr.c
index cf51bd69d4..0fc8037b1b 100644
--- a/c/src/lib/libbsp/i960/cvme961/shmsupp/mpisr.c
+++ b/c/src/lib/libbsp/i960/cvme961/shmsupp/mpisr.c
@@ -19,7 +19,7 @@
#include <rtems.h>
#include <bsp.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_isr Shm_isr_cvme961(
rtems_vector_number vector
diff --git a/c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c b/c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c
index 86d465c499..6b68ddc60e 100644
--- a/c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c
+++ b/c/src/lib/libbsp/i960/rxgen960/shmsupp/addrconv.c
@@ -23,7 +23,7 @@
#include <rtems.h>
#include <bsp.h>
-#include "shm.h"
+#include "shm_driver.h"
void *Shm_Convert_address(
void *address
diff --git a/c/src/lib/libbsp/i960/rxgen960/shmsupp/getcfg.c b/c/src/lib/libbsp/i960/rxgen960/shmsupp/getcfg.c
index aac8d9c52b..3a009aee02 100644
--- a/c/src/lib/libbsp/i960/rxgen960/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/i960/rxgen960/shmsupp/getcfg.c
@@ -43,7 +43,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
#define USE_ONBOARD_RAM 0 /* use onboard (1) or VME RAM */
/* for SHM communications */
diff --git a/c/src/lib/libbsp/i960/rxgen960/shmsupp/lock.c b/c/src/lib/libbsp/i960/rxgen960/shmsupp/lock.c
index f74188a1b3..0a546effe7 100644
--- a/c/src/lib/libbsp/i960/rxgen960/shmsupp/lock.c
+++ b/c/src/lib/libbsp/i960/rxgen960/shmsupp/lock.c
@@ -19,7 +19,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
/*
* Shm_Initialize_lock
diff --git a/c/src/lib/libbsp/i960/rxgen960/shmsupp/mpisr.c b/c/src/lib/libbsp/i960/rxgen960/shmsupp/mpisr.c
index 983d57e54a..308fb57231 100644
--- a/c/src/lib/libbsp/i960/rxgen960/shmsupp/mpisr.c
+++ b/c/src/lib/libbsp/i960/rxgen960/shmsupp/mpisr.c
@@ -19,7 +19,7 @@
#include <rtems.h>
#include <bsp.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_isr Shm_isr_rxgen960(
rtems_vector_number vector
diff --git a/c/src/lib/libbsp/m68k/mvme136/shmsupp/addrconv.c b/c/src/lib/libbsp/m68k/mvme136/shmsupp/addrconv.c
index fc1bcd83ba..39f323614c 100644
--- a/c/src/lib/libbsp/m68k/mvme136/shmsupp/addrconv.c
+++ b/c/src/lib/libbsp/m68k/mvme136/shmsupp/addrconv.c
@@ -21,7 +21,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
void *Shm_Convert_address(
void *address
diff --git a/c/src/lib/libbsp/m68k/mvme136/shmsupp/getcfg.c b/c/src/lib/libbsp/m68k/mvme136/shmsupp/getcfg.c
index 1cf0e9c3bd..0802976a32 100644
--- a/c/src/lib/libbsp/m68k/mvme136/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/m68k/mvme136/shmsupp/getcfg.c
@@ -33,7 +33,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
#define INTERRUPT 1 /* MVME136 target supports both */
#define POLLING 0 /* polling and interrupt modes */
diff --git a/c/src/lib/libbsp/m68k/mvme136/shmsupp/lock.c b/c/src/lib/libbsp/m68k/mvme136/shmsupp/lock.c
index 6917d3fc22..63729ca771 100644
--- a/c/src/lib/libbsp/m68k/mvme136/shmsupp/lock.c
+++ b/c/src/lib/libbsp/m68k/mvme136/shmsupp/lock.c
@@ -18,7 +18,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
/*
* Shm_Initialize_lock
diff --git a/c/src/lib/libbsp/m68k/mvme136/shmsupp/mpisr.c b/c/src/lib/libbsp/m68k/mvme136/shmsupp/mpisr.c
index f04ab000e6..20bb9a7401 100644
--- a/c/src/lib/libbsp/m68k/mvme136/shmsupp/mpisr.c
+++ b/c/src/lib/libbsp/m68k/mvme136/shmsupp/mpisr.c
@@ -15,7 +15,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
rtems_isr Shm_isr_mvme136()
{
diff --git a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/addrconv.c b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/addrconv.c
index d4756c3b0d..e26111c8c3 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/addrconv.c
+++ b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/addrconv.c
@@ -25,7 +25,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
void *Shm_Convert_address(
void *address
diff --git a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c
index 66105fc153..bfe0cc5d52 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/getcfg.c
@@ -29,7 +29,7 @@
#include <bsp.h>
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
#define INTERRUPT 1 /* MVME147 target supports both */
#define POLLING 0 /* polling and interrupt modes */
diff --git a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/lock.c b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/lock.c
index 6917d3fc22..63729ca771 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/lock.c
+++ b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/lock.c
@@ -18,7 +18,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
/*
* Shm_Initialize_lock
diff --git a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/mpisr.c b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/mpisr.c
index 8bad4c53d8..e473bb22fb 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/shmsupp/mpisr.c
+++ b/c/src/lib/libbsp/m68k/mvme147s/shmsupp/mpisr.c
@@ -19,7 +19,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
rtems_isr Shm_isr_mvme147()
{
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/addrconv.c b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/addrconv.c
index 9b000cc082..d8a283c87a 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/addrconv.c
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/addrconv.c
@@ -20,7 +20,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
void *Shm_Convert_address(
void *address
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/getcfg.c b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/getcfg.c
index c044315af4..74ad7cee46 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/getcfg.c
@@ -33,7 +33,7 @@ XXX: FIX THE COMMENTS BELOW WHEN THE CPU IS KNOWN
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
/*
* configured if currently polling of interrupt driven
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/lock.c b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/lock.c
index 6cfd2a015a..81d424a39e 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/lock.c
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/lock.c
@@ -18,7 +18,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
/*
* Shm_Initialize_lock
diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/mpisr.c b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/mpisr.c
index cfe3dfa267..8d7054b8da 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/mpisr.c
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/mpisr.c
@@ -12,7 +12,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
rtems_isr Shm_isr_nobsp( void )
{
diff --git a/c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c b/c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c
index a2aaabe79f..ccdc6acae2 100644
--- a/c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c
+++ b/c/src/lib/libbsp/powerpc/psim/shmsupp/addrconv.c
@@ -20,7 +20,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
void *Shm_Convert_address(
void *address
diff --git a/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c b/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c
index b6d389fea7..80f5c5073d 100644
--- a/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c
@@ -23,7 +23,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
#define INTERRUPT 0 /* PSIM target supports only */
#define POLLING 1 /* polling mode. */
diff --git a/c/src/lib/libbsp/powerpc/psim/shmsupp/lock.c b/c/src/lib/libbsp/powerpc/psim/shmsupp/lock.c
index 56a1087e53..1f9d534260 100644
--- a/c/src/lib/libbsp/powerpc/psim/shmsupp/lock.c
+++ b/c/src/lib/libbsp/powerpc/psim/shmsupp/lock.c
@@ -19,7 +19,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
typedef volatile unsigned int volint;
diff --git a/c/src/lib/libbsp/powerpc/psim/shmsupp/mpisr.c b/c/src/lib/libbsp/powerpc/psim/shmsupp/mpisr.c
index e31dd2c615..46aba4b442 100644
--- a/c/src/lib/libbsp/powerpc/psim/shmsupp/mpisr.c
+++ b/c/src/lib/libbsp/powerpc/psim/shmsupp/mpisr.c
@@ -15,7 +15,7 @@
#include <rtems.h>
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
/* void _Shm_setvec( )
diff --git a/c/src/lib/libbsp/shmdr/Makefile.in b/c/src/lib/libbsp/shmdr/Makefile.in
index 26afa98d42..ed4f4d8475 100644
--- a/c/src/lib/libbsp/shmdr/Makefile.in
+++ b/c/src/lib/libbsp/shmdr/Makefile.in
@@ -21,7 +21,7 @@ C_PIECES = addlq cnvpkt getlq dump fatal getpkt init initlq intr mpisr poll \
C_FILES = $(C_PIECES:%=%.c)
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
-H_PIECES = shm mpci
+H_PIECES = shm_driver mpci
H_FILES = $(H_PIECES:%=$(srcdir)/%.h)
SRCS = $(C_FILES) $(H_FILES)
diff --git a/c/src/lib/libbsp/shmdr/addlq.c b/c/src/lib/libbsp/shmdr/addlq.c
index 7434baa688..141b98796e 100644
--- a/c/src/lib/libbsp/shmdr/addlq.c
+++ b/c/src/lib/libbsp/shmdr/addlq.c
@@ -19,7 +19,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Locked_queue_Add(
Shm_Locked_queue_Control *lq_cb,
diff --git a/c/src/lib/libbsp/shmdr/cnvpkt.c b/c/src/lib/libbsp/shmdr/cnvpkt.c
index 66dc92a172..616bbad8e7 100644
--- a/c/src/lib/libbsp/shmdr/cnvpkt.c
+++ b/c/src/lib/libbsp/shmdr/cnvpkt.c
@@ -24,7 +24,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Convert_packet(
rtems_packet_prefix *packet
diff --git a/c/src/lib/libbsp/shmdr/dump.c b/c/src/lib/libbsp/shmdr/dump.c
index 7b6850083f..10e8e6dbd7 100644
--- a/c/src/lib/libbsp/shmdr/dump.c
+++ b/c/src/lib/libbsp/shmdr/dump.c
@@ -19,7 +19,7 @@
#include <rtems.h>
#include <stdio.h>
-#include "shm.h"
+#include "shm_driver.h"
void
Shm_Print_statistics(void)
diff --git a/c/src/lib/libbsp/shmdr/fatal.c b/c/src/lib/libbsp/shmdr/fatal.c
index 6a085ea934..340c65e59e 100644
--- a/c/src/lib/libbsp/shmdr/fatal.c
+++ b/c/src/lib/libbsp/shmdr/fatal.c
@@ -18,7 +18,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void MPCI_Fatal(
Internal_errors_Source source,
diff --git a/c/src/lib/libbsp/shmdr/getlq.c b/c/src/lib/libbsp/shmdr/getlq.c
index 9ec31c9605..199721b9ab 100644
--- a/c/src/lib/libbsp/shmdr/getlq.c
+++ b/c/src/lib/libbsp/shmdr/getlq.c
@@ -21,7 +21,7 @@
*/
#include <rtems.h>
-#include <shm.h>
+#include <shm_driver.h>
Shm_Envelope_control *Shm_Locked_queue_Get(
Shm_Locked_queue_Control *lq_cb
diff --git a/c/src/lib/libbsp/shmdr/getpkt.c b/c/src/lib/libbsp/shmdr/getpkt.c
index 149bbe75e5..9ed8e42a46 100644
--- a/c/src/lib/libbsp/shmdr/getpkt.c
+++ b/c/src/lib/libbsp/shmdr/getpkt.c
@@ -20,7 +20,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_mpci_entry Shm_Get_packet(
rtems_packet_prefix **packet
diff --git a/c/src/lib/libbsp/shmdr/init.c b/c/src/lib/libbsp/shmdr/init.c
index 71350fa3d2..b4ca93a08a 100644
--- a/c/src/lib/libbsp/shmdr/init.c
+++ b/c/src/lib/libbsp/shmdr/init.c
@@ -20,7 +20,7 @@
#define _SHM_INIT
#include <rtems.h>
-#include <shm.h>
+#include <shm_driver.h>
#include <string.h> /* memset() */
#include <stdlib.h> /* malloc() */
diff --git a/c/src/lib/libbsp/shmdr/initlq.c b/c/src/lib/libbsp/shmdr/initlq.c
index e93ce6dd3f..e2e0dd1f8c 100644
--- a/c/src/lib/libbsp/shmdr/initlq.c
+++ b/c/src/lib/libbsp/shmdr/initlq.c
@@ -20,7 +20,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Locked_queue_Initialize(
Shm_Locked_queue_Control *lq_cb,
diff --git a/c/src/lib/libbsp/shmdr/intr.c b/c/src/lib/libbsp/shmdr/intr.c
index 3b730459a8..3374919222 100644
--- a/c/src/lib/libbsp/shmdr/intr.c
+++ b/c/src/lib/libbsp/shmdr/intr.c
@@ -23,7 +23,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Cause_interrupt(
rtems_unsigned32 node
diff --git a/c/src/lib/libbsp/shmdr/mpci.h b/c/src/lib/libbsp/shmdr/mpci.h
index 3afb4034b7..203c77dbcd 100644
--- a/c/src/lib/libbsp/shmdr/mpci.h
+++ b/c/src/lib/libbsp/shmdr/mpci.h
@@ -21,7 +21,7 @@
extern "C" {
#endif
-#include <shm.h>
+#include <shm_driver.h>
#define MPCI_Initialization( _configuration ) \
Shm_Initialization( _configuration )
@@ -38,7 +38,7 @@ extern "C" {
#define MPCI_Send_packet( _destination, _the_packet ) \
Shm_Send_packet( _destination, _the_packet )
-/* Unnecessary... mapped in shm.h
+/* Unnecessary... mapped in shm_driver.h
#define MPCI_Fatal( _the_error ) \
Shm_Fatal( _the_error )
*/
diff --git a/c/src/lib/libbsp/shmdr/mpisr.c b/c/src/lib/libbsp/shmdr/mpisr.c
index da07e0279f..fc761101cd 100644
--- a/c/src/lib/libbsp/shmdr/mpisr.c
+++ b/c/src/lib/libbsp/shmdr/mpisr.c
@@ -11,7 +11,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_isr Shm_isr(
rtems_vector_number vector
diff --git a/c/src/lib/libbsp/shmdr/poll.c b/c/src/lib/libbsp/shmdr/poll.c
index ec428bb74c..9c3571ae22 100644
--- a/c/src/lib/libbsp/shmdr/poll.c
+++ b/c/src/lib/libbsp/shmdr/poll.c
@@ -22,7 +22,7 @@
#include <rtems/score/sysstate.h>
#include <rtems/libio.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Poll()
{
diff --git a/c/src/lib/libbsp/shmdr/receive.c b/c/src/lib/libbsp/shmdr/receive.c
index 5b8cd2e9e8..8d1b2349f7 100644
--- a/c/src/lib/libbsp/shmdr/receive.c
+++ b/c/src/lib/libbsp/shmdr/receive.c
@@ -22,7 +22,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_mpci_entry Shm_Receive_packet(
rtems_packet_prefix **packet
diff --git a/c/src/lib/libbsp/shmdr/retpkt.c b/c/src/lib/libbsp/shmdr/retpkt.c
index 027a9a7659..c013916603 100644
--- a/c/src/lib/libbsp/shmdr/retpkt.c
+++ b/c/src/lib/libbsp/shmdr/retpkt.c
@@ -20,7 +20,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_mpci_entry Shm_Return_packet(
rtems_packet_prefix *packet
diff --git a/c/src/lib/libbsp/shmdr/send.c b/c/src/lib/libbsp/shmdr/send.c
index 4ffdd5d905..2e5f60988e 100644
--- a/c/src/lib/libbsp/shmdr/send.c
+++ b/c/src/lib/libbsp/shmdr/send.c
@@ -22,7 +22,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
struct pkt_cpy {
rtems_unsigned32 packet[MAX_PACKET_SIZE/4];
diff --git a/c/src/lib/libbsp/shmdr/setckvec.c b/c/src/lib/libbsp/shmdr/setckvec.c
index 770b695903..9be1b48945 100644
--- a/c/src/lib/libbsp/shmdr/setckvec.c
+++ b/c/src/lib/libbsp/shmdr/setckvec.c
@@ -20,7 +20,7 @@
#include <rtems.h>
#include <rtems/libio.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_isr Shm_setclockvec()
{
diff --git a/c/src/lib/libbsp/shmdr/shm.h b/c/src/lib/libbsp/shmdr/shm.h
deleted file mode 100644
index 2f212fd759..0000000000
--- a/c/src/lib/libbsp/shmdr/shm.h
+++ /dev/null
@@ -1,541 +0,0 @@
-/* shm.h
- *
- * This include file contains all the constants, structures,
- * and global variables for this RTEMS based shared memory
- * communications interface driver.
- *
- * Processor board dependencies are in other files.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- */
-
-#ifndef __SHM_h
-#define __SHM_h
-
-#include <clockdrv.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* The information contained in the Node Status, Locked Queue, and
- * Envelope Control Blocks must be maintained in a NEUTRAL format.
- * Currently the neutral format may be selected as big or little
- * endian by simply defining either NEUTRAL_BIG or NEUTRAL_LITTLE.
- *
- * It is CRITICAL to note that the neutral format can ONLY be
- * changed by modifying this file and recompiling the ENTIRE
- * SHM driver including ALL target specific support files.
- *
- * The following table details the memory contents for the endian
- * field of the Node Status Control Block in the various
- * data format configurations (data is in hexadecimal):
- *
- * NEUTRAL NATIVE BYTE 0 BYTE 1 BYTE 2 BYTE 3
- * ======= ====== ====== ====== ====== ======
- * BIG BIG 00 00 00 01
- * BIG LITTLE 10 00 00 00
- * LITTLE BIG 01 00 00 00
- * LITTLE LITTLE 00 00 00 10
- *
- *
- * NOTE: XXX
- * PORTABILITY OF LOCKING INSTRUCTIONS
- * ===================================
- * The locking mechanism described below is not
- * general enough. Where the hardware supports
- * it we should use "atomic swap" instructions
- * so the values in the lock can be tailored to
- * support a CPU with only weak atomic memory
- * instructions. There are combinations of
- * CPUs with inflexible atomic memory instructions
- * which appear to be incompatible. For example,
- * the SPARClite instruction uses a byte which is
- * 0xFF when locked. The PA-RISC uses 1 to indicate
- * locked and 0 when unlocked. These CPUs appear to
- * have incompatible lock instructions. But
- * they could be used in a heterogenous system
- * with does not mix SPARCs and PA-RISCs. For
- * example, the i386 and SPARC or i386 and SPARC
- * could work together. The bottom line is that
- * not every CPU will work together using this
- * locking scheme. There are supposed to be
- * algorithms to do this without hardware assist
- * and one of these should be incorporated into
- * the shared memory driver.
- *
- * The most flexible scheme using the instructions
- * of the various CPUs for efficiency would be to use
- * "atomic swaps" wherever possible. Make the lock
- * and unlock configurable much like BIG vs LITTLE
- * endian use of shared memory is now. The values
- * of the lock could then reflect the "worst"
- * CPU in a system. This still results in mixes
- * of CPUs which are incompatible.
- *
- * The current locking mechanism is based upon the MC68020
- * "tas" instruction which is atomic. All ports to other CPUs
- * comply with the restrictive placement of lock bit by this
- * instruction. The lock bit is the most significant bit in a
- * big-endian rtems_unsigned32. On other processors, the lock is
- * typically implemented via an atomic swap or atomic modify
- * bits type instruction.
- */
-
-#define NEUTRAL_BIG
-
-#ifdef NEUTRAL_BIG
-#define SHM_BIG 0x00000001
-#define SHM_LITTLE 0x10000000
-#endif
-
-#ifdef NEUTRAL_LITTLE
-#define SHM_BIG 0x01000000
-#define SHM_LITTLE 0x00000010
-#endif
-
-/*
- * The following are the values used to fill in the lock field. Some CPUs
- * are able to write only a single value into field. By making the
- * lock and unlock values configurable, CPUs which support "atomic swap"
- * instructions can generally be made to work in any heterogeneous
- * configuration. However, it is possible for two CPUs to be incompatible
- * in regards to the lock field values. This occurs when two CPUs
- * which write only a single value to the field are used in a system
- * but the two CPUs write different incompatible values.
- *
- * NOTE: The following is a first attempt at defining values which
- * have a chance at working together. The m68k should use
- * chk2 instead of tas to be less restrictive. Target endian
- * problems (like the Force CPU386 which has (broken) big endian
- * view of the VMEbus address space) are not addressed yet.
- */
-
-#if defined(__i960__)
-#define SHM_LOCK_VALUE 0x00000080
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__mc68000__)
-#define SHM_LOCK_VALUE 0x80000000
-#define SHM_UNLOCK_VALUE 0
-#define SHM_LOCK_VALUE 0x80000000
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__i386__)
-#define SHM_LOCK_VALUE 0x80000000
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__mips__)
-#define SHM_LOCK_VALUE 0x80000000
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__hppa__)
-#define SHM_LOCK_VALUE 0
-#define SHM_UNLOCK_VALUE 1
-#elif defined(__PPC__)
-#define SHM_LOCK_VALUE 1
-#define SHM_UNLOCK_VALUE 0
-#elif defined(__unix__)
-#define SHM_LOCK_VALUE 0
-#define SHM_UNLOCK_VALUE 1
-#elif defined(no_cpu) /* for this values are irrelevant */
-#define SHM_LOCK_VALUE 1
-#define SHM_UNLOCK_VALUE 0
-#else
-#error "shm.h - no SHM_LOCK_VALUE defined for this CPU architecture"
-#endif
-
-#define Shm_Convert( value ) \
- ((Shm_Configuration->convert) ? \
- (*Shm_Configuration->convert)(value) : (value))
-
-/* constants */
-
-#define SHM_MASTER 1 /* master initialization node */
-#define SHM_FIRST_NODE 1
-
-/* size constants */
-
-#define KILOBYTE (1024)
-#define MEGABYTE (1024*1024)
-
-/* inter-node interrupt values */
-
-#define NO_INTERRUPT 0 /* used for polled nodes */
-#define BYTE 1
-#define WORD 2
-#define LONG 4
-
-/* operational mode constants -- used in SHM Configuration Table */
-#define POLLED_MODE 0
-#define INTR_MODE 1
-
-/* error codes */
-
-#define NO_ERROR 0
-#define SHM_NO_FREE_PKTS 0xf0000
-
-/* null pointers of different types */
-
-#define NULL_ENV_CB ((Shm_Envelope_control *) 0)
-#define NULL_CONVERT 0
-
-/*
- * size of stuff before preamble in envelope.
- * It must be a constant since we will use it to generate MAX_PACKET_SIZE
- */
-
-#define SHM_ENVELOPE_PREFIX_OVERHEAD (4 * sizeof(vol_u32))
-
-/*
- * The following is adjusted so envelopes are MAX_ENVELOPE_SIZE bytes long.
- * It must be >= RTEMS_MINIMUM_PACKET_SIZE in mppkt.h.
- */
-
-#ifndef MAX_ENVELOPE_SIZE
-#define MAX_ENVELOPE_SIZE 0x180
-#endif
-
-#define MAX_PACKET_SIZE (MAX_ENVELOPE_SIZE - \
- SHM_ENVELOPE_PREFIX_OVERHEAD + \
- sizeof(Shm_Envelope_preamble) + \
- sizeof(Shm_Envelope_postamble))
-
-
-/* constants pertinent to Locked Queue routines */
-
-#define LQ_UNLOCKED SHM_UNLOCK_VALUE
-#define LQ_LOCKED SHM_LOCK_VALUE
-
-/* constants related to the Free Envelope Pool */
-
-#define FREE_ENV_POOL 0
-#define FREE_ENV_CB (&Shm_Locked_queues[ FREE_ENV_POOL ])
-
-/* The following are important when dealing with
- * the shared memory communications interface area.
- *
- * NOTE: The starting address and length of the shared memory
- * is defined in a system dependent file.
- */
-
-#define START_NS_CBS ((void *)Shm_Configuration->base)
-#define START_LQ_CBS ((START_NS_CBS) + \
- ( (sizeof (Shm_Node_status_control)) * (Shm_Maximum_nodes + 1) ) )
-#define START_ENVELOPES ( ((void *) START_LQ_CBS) + \
- ( (sizeof (Shm_Locked_queue_Control)) * (Shm_Maximum_nodes + 1) ) )
-#define END_SHMCI_AREA ( (void *) START_ENVELOPES + \
- ( (sizeof (Shm_Envelope_control)) * Shm_Maximum_envelopes ) )
-#define END_SHARED_MEM (START_NS_CBS+Shm_Configuration->length)
-
-/* macros */
-
-#define Shm_Is_master_node() \
- ( SHM_MASTER == Shm_Local_node )
-
-#define Shm_Free_envelope( ecb ) \
- Shm_Locked_queue_Add( FREE_ENV_CB, (ecb) )
-#define Shm_Allocate_envelope() \
- Shm_Locked_queue_Get(FREE_ENV_CB)
-
-#define Shm_Initialize_receive_queue(node) \
- Shm_Locked_queue_Initialize( &Shm_Locked_queues[node], node )
-
-#define Shm_Append_to_receive_queue(node, ecb) \
- Shm_Locked_queue_Add( &Shm_Locked_queues[node], (ecb) )
-
-#define Shm_Envelope_control_to_packet_prefix_pointer(ecb) \
- ((void *)(ecb)->packet)
-
-#define Shm_Packet_prefix_to_envelope_control_pointer( pkt ) \
- ((Shm_Envelope_control *)((rtems_unsigned8 *)(pkt) - \
- (sizeof(Shm_Envelope_preamble) + SHM_ENVELOPE_PREFIX_OVERHEAD)))
-
-#define Shm_Build_preamble(ecb, node) \
- (ecb)->Preamble.endian = Shm_Configuration->format
-
-#define Shm_Build_postamble( ecb )
-
-/* volatile types */
-
-typedef volatile rtems_unsigned8 vol_u8;
-typedef volatile rtems_unsigned32 vol_u32;
-
-/* shm control information */
-
-struct shm_info {
- vol_u32 not_currently_used_0;
- vol_u32 not_currently_used_1;
- vol_u32 not_currently_used_2;
- vol_u32 not_currently_used_3;
-};
-
-typedef struct {
- /*byte start_of_text;*/
- vol_u32 endian;
- vol_u32 not_currently_used_0;
- vol_u32 not_currently_used_1;
- vol_u32 not_currently_used_2;
-} Shm_Envelope_preamble;
-
-typedef struct {
-} Shm_Envelope_postamble;
-
-/* WARNING! If you change this structure, don't forget to change
- * SHM_ENVELOPE_PREFIX_OVERHEAD and
- * Shm_Packet_prefix_to_envelope_control_pointer() above.
- */
-
-/* This comment block describes the contents of each field
- * of the Envelope Control Block:
- *
- * next - The index of the next envelope on this queue.
- * queue - The index of the queue this envelope is on.
- * index - The index of this envelope.
- * Preamble - Generic packet preamble. One day this structure
- * could be enhanced to contain routing information.
- * packet - RTEMS MPCI packet. Untouched by SHM Driver
- * other than copying and format conversion as
- * documented in the RTEMS User's Guide.
- * Postamble - Generic packet postamble. One day this structure
- * could be enhanced to contain checksum information.
- */
-
-typedef struct {
- vol_u32 next; /* next envelope on queue */
- vol_u32 queue; /* queue on which this resides */
- vol_u32 index; /* index into array of envelopes*/
- vol_u32 pad0; /* insure the next one is aligned */
- Shm_Envelope_preamble Preamble; /* header information */
- vol_u8 packet[MAX_PACKET_SIZE]; /* RTEMS INFO */
- Shm_Envelope_postamble Postamble;/* trailer information */
-} Shm_Envelope_control;
-
-/* This comment block describes the contents of each field
- * of the Locked Queue Control Block:
- *
- * lock - Lock used to insure mutually exclusive access.
- * front - Index of first envelope on queue. This field
- * is used to remove head of queue (receive).
- * rear - Index of last envelope on queue. This field
- * is used to add evelope to queue (send).
- * owner - The node number of the recipient (owning) node.
- * RTEMS does not use the node number zero (0).
- * The zero node is used by the SHM Driver for the
- * Free Envelope Queue shared by all nodes.
- */
-
-typedef struct {
- vol_u32 lock; /* lock field for this queue */
- vol_u32 front; /* first envelope on queue */
- vol_u32 rear; /* last envelope on queue */
- vol_u32 owner; /* receiving (i.e. owning) node */
-} Shm_Locked_queue_Control;
-
-/* This comment block describes the contents of each field
- * of the Node Status Control Block:
- *
- * status - Node status. Current values are Pending Initialization,
- * Initialization Complete, and Active Node. Other values
- * could be added to enhance fault tolerance.
- * error - Zero if the node has not failed. Otherwise,
- * this field contains a status indicating the
- * failure reason.
- * int_address, int_value, and int_length
- * - These field are the Interrupt Information table
- * for this node in neutral format. This is how
- * each node knows how to generate interrupts.
- */
-
-typedef struct {
- vol_u32 status; /* node status information */
- vol_u32 error; /* fatal error code */
- vol_u32 int_address; /* write here for interrupt */
- vol_u32 int_value; /* this value causes interrupt */
- vol_u32 int_length; /* for this length (0,1,2,4) */
- vol_u32 not_currently_used_0;
- vol_u32 not_currently_used_1;
- vol_u32 not_currently_used_2;
-} Shm_Node_status_control;
-
-/* This comment block describes the contents of each field
- * of the Interrupt Information Table. This table describes
- * how another node can generate an interrupt to this node.
- * This information is target board dependent. If the
- * SHM Driver is in POLLED_MODE, then all fields should
- * be initialized to NO_INTERRUPT.
- *
- * address - The address to which another node should
- * write to cause an interrupt.
- * value - The value which must be written
- * length - The size of the value to write. Valid
- * values are BYTE, WORD, and LONG.
- *
- * NOTE: The Node Status Control Block contains this
- * information in neutral format and not in a
- * structure to avoid potential alignment problems.
- */
-
-typedef struct {
- vol_u32 *address; /* write here for interrupt */
- vol_u32 value; /* this value causes interrupt */
- vol_u32 length; /* for this length (0,1,2,4) */
-} Shm_Interrupt_information;
-
-/* SHM Configuration Table
- *
- * This comment block describes the contents of each field
- * of the SHM Configuration Table.
- *
- * base - The base address of the shared memory. This
- * address may be specific to this node.
- * length - The length of the shared memory in bytes.
- * format - The natural format for rtems_unsigned32's in the
- * shared memory. Valid values are currently
- * only SHM_LITTLE and SHM_BIG.
- * convert - The address of the routine which converts
- * between neutral and local format.
- * poll_intr - The operational mode of the driver. Some
- * target boards may not provide hardware for
- * an interprocessor interrupt. If POLLED_MODE
- * is selected, the SHM driver will install a
- * wrapper around the Clock_isr() to poll for
- * incoming packets. Throughput is dependent
- * on the time between clock interrupts.
- * Valid values are POLLED_MODE and INTR_MODE.
- * cause_intr - This is the address of the routine used to
- * write to a particular address and cause an
- * interrupt on another node. This routine
- * may need to be target dependent if something
- * other than a normal write from C does not work.
- * Intr - This structure describes the operation required
- * to cause an interrupt to this node. The actual
- * contents of this structure are described above.
- */
-
-struct shm_config_info {
- vol_u32 *base; /* base address of SHM */
- vol_u32 length; /* length (in bytes) of SHM */
- vol_u32 format; /* SHM is big or little endian */
- vol_u32 (*convert)();/* neutral conversion routine */
- vol_u32 poll_intr;/* POLLED or INTR driven mode */
- void (*cause_intr)( rtems_unsigned32 );
- Shm_Interrupt_information Intr; /* cause intr information */
-};
-
-typedef struct shm_config_info shm_config_table;
-
-/* global variables */
-
-#ifdef _SHM_INIT
-#define SHM_EXTERN
-#else
-#define SHM_EXTERN extern
-#endif
-
-SHM_EXTERN shm_config_table *Shm_Configuration;
-SHM_EXTERN Shm_Interrupt_information *Shm_Interrupt_table;
-SHM_EXTERN Shm_Node_status_control *Shm_Node_statuses;
-SHM_EXTERN Shm_Locked_queue_Control *Shm_Locked_queues;
-SHM_EXTERN Shm_Envelope_control *Shm_Envelopes;
-SHM_EXTERN rtems_configuration_table *Shm_RTEMS_Configuration;
-SHM_EXTERN rtems_multiprocessing_table *Shm_RTEMS_MP_Configuration;
-SHM_EXTERN rtems_unsigned32 Shm_Receive_message_count;
-SHM_EXTERN rtems_unsigned32 Shm_Null_message_count;
-SHM_EXTERN rtems_unsigned32 Shm_Interrupt_count;
-SHM_EXTERN rtems_unsigned32 Shm_Local_node;
-SHM_EXTERN Shm_Locked_queue_Control *Shm_Local_receive_queue;
-SHM_EXTERN Shm_Node_status_control *Shm_Local_node_status;
-SHM_EXTERN rtems_unsigned32 Shm_isrstat;
- /* reported by shmdr */
-
-SHM_EXTERN rtems_unsigned32 Shm_Pending_initialization;
-SHM_EXTERN rtems_unsigned32 Shm_Initialization_complete;
-SHM_EXTERN rtems_unsigned32 Shm_Active_node;
-
-SHM_EXTERN rtems_unsigned32 Shm_Maximum_nodes;
-SHM_EXTERN rtems_unsigned32 Shm_Maximum_envelopes;
-
-SHM_EXTERN rtems_unsigned32 Shm_Locked_queue_End_of_list;
-SHM_EXTERN rtems_unsigned32 Shm_Locked_queue_Not_on_list;
-
-/* functions */
-
-/* locked queue routines */
-void Shm_Locked_queue_Add(
- Shm_Locked_queue_Control *, Shm_Envelope_control * );
-Shm_Envelope_control *Shm_Locked_queue_Get( Shm_Locked_queue_Control * );
-void Shm_Locked_queue_Initialize(
- Shm_Locked_queue_Control *, rtems_unsigned32 );
- /* Shm_Initialize_lock is CPU dependent */
- /* Shm_Lock is CPU dependent */
- /* Shm_Unlock is CPU dependent */
-
-/* portable routines */
-void Init_env_pool();
-void Shm_Print_statistics( void );
-void MPCI_Fatal( Internal_errors_Source, boolean, rtems_unsigned32 );
-rtems_task Shm_Cause_interrupt( rtems_unsigned32 );
-void Shm_Poll();
-void Shm_setclockvec();
-void Shm_Convert_packet( rtems_packet_prefix * );
-
-/* CPU specific routines are inlined in shmcpu.h */
-
-/* target specific routines */
-void *Shm_Convert_address( void * );
-void Shm_Get_configuration( rtems_unsigned32, shm_config_table ** );
-void Shm_isr();
-void Shm_setvec( void );
-
-void Shm_Initialize_lock( Shm_Locked_queue_Control * );
-void Shm_Lock( Shm_Locked_queue_Control * );
-void Shm_Unlock( Shm_Locked_queue_Control * );
-
-/* MPCI entry points */
-rtems_mpci_entry Shm_Get_packet(
- rtems_packet_prefix **
-);
-
-rtems_mpci_entry Shm_Initialization( void );
-
-rtems_mpci_entry Shm_Receive_packet(
- rtems_packet_prefix **
-);
-
-rtems_mpci_entry Shm_Return_packet(
- rtems_packet_prefix *
-);
-
-rtems_mpci_entry Shm_Send_packet(
- rtems_unsigned32,
- rtems_packet_prefix *
-);
-
-extern rtems_mpci_table MPCI_table;
-
-#ifdef _SHM_INIT
-
-/* multiprocessor communications interface (MPCI) table */
-
-rtems_mpci_table MPCI_table = {
- 100000, /* default timeout value in ticks */
- MAX_PACKET_SIZE, /* maximum packet size */
- Shm_Initialization, /* initialization procedure */
- Shm_Get_packet, /* get packet procedure */
- Shm_Return_packet, /* return packet procedure */
- Shm_Send_packet, /* packet send procedure */
- Shm_Receive_packet /* packet receive procedure */
-};
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */
diff --git a/c/src/lib/libbsp/shmdr/shm_driver.h b/c/src/lib/libbsp/shmdr/shm_driver.h
index 2f212fd759..7efc9dbfcb 100644
--- a/c/src/lib/libbsp/shmdr/shm_driver.h
+++ b/c/src/lib/libbsp/shmdr/shm_driver.h
@@ -1,4 +1,4 @@
-/* shm.h
+/* shm_driver.h
*
* This include file contains all the constants, structures,
* and global variables for this RTEMS based shared memory
@@ -145,7 +145,7 @@ extern "C" {
#define SHM_LOCK_VALUE 1
#define SHM_UNLOCK_VALUE 0
#else
-#error "shm.h - no SHM_LOCK_VALUE defined for this CPU architecture"
+#error "shm_driver.h - no SHM_LOCK_VALUE defined for this CPU architecture"
#endif
#define Shm_Convert( value ) \
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.in b/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.in
index c8eb097608..7734daacd6 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.in
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/Makefile.in
@@ -16,7 +16,7 @@ VPATH = @srcdir@
PGM = ${ARCH}/shmsupp.rel
# C source names, if any, go here -- minus the .c
-C_PIECES = addrconv getcfg intr lock mpisr
+C_PIECES = addrconv getcfg cause_intr lock mpisr
C_FILES = $(C_PIECES:%=%.c)
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/addrconv.c b/c/src/lib/libbsp/unix/posix/shmsupp/addrconv.c
index 120ec7eccf..a3d4a8ff49 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/addrconv.c
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/addrconv.c
@@ -19,7 +19,7 @@
*/
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
void *Shm_Convert_address(
void *addr
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/intr.c b/c/src/lib/libbsp/unix/posix/shmsupp/cause_intr.c
index 6baf56201d..39e98c96b0 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/intr.c
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/cause_intr.c
@@ -19,7 +19,7 @@
*/
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
#include <sys/types.h> /* pid_t */
void Shm_Cause_interrupt_unix(
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c b/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c
index 03477883e0..bc0d1c279d 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c
@@ -25,7 +25,7 @@
*/
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
#include <sys/types.h> /* pid_t */
shm_config_table BSP_shm_cfgtbl;
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/lock.c b/c/src/lib/libbsp/unix/posix/shmsupp/lock.c
index 00e9c6f3d9..dc3a61df5f 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/lock.c
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/lock.c
@@ -17,7 +17,7 @@
*/
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
/*
* Shm_Initialize_lock
diff --git a/c/src/lib/libbsp/unix/posix/shmsupp/mpisr.c b/c/src/lib/libbsp/unix/posix/shmsupp/mpisr.c
index a6e892863c..3838cdb98f 100644
--- a/c/src/lib/libbsp/unix/posix/shmsupp/mpisr.c
+++ b/c/src/lib/libbsp/unix/posix/shmsupp/mpisr.c
@@ -18,7 +18,7 @@
*/
#include <bsp.h>
-#include <shm.h>
+#include <shm_driver.h>
void Shm_setvec( void )
{
diff --git a/c/src/lib/libbsp/unix/posix/wrapup/Makefile.in b/c/src/lib/libbsp/unix/posix/wrapup/Makefile.in
index 5f3f83cec2..f0260c8036 100644
--- a/c/src/lib/libbsp/unix/posix/wrapup/Makefile.in
+++ b/c/src/lib/libbsp/unix/posix/wrapup/Makefile.in
@@ -27,7 +27,7 @@ BSP_PIECES = startup clock console timer $(BSP_MP_O_PIECES)
CPU_PIECES =
GENERIC_MP_REL_PIECES_yes_V = shmdr
-GENERIC_MP_REL_PIECES = $(GENERIC_MP_REL_$(HAS_MP)_V)
+GENERIC_MP_REL_PIECES = $(GENERIC_MP_REL_PIECES_$(HAS_MP)_V)
GENERIC_PIECES = $(GENERIC_MP_REL_PIECES)
# bummer; have to use $foreach since % pattern subst rules only replace 1x
diff --git a/c/src/libchip/shmdr/addlq.c b/c/src/libchip/shmdr/addlq.c
index 7434baa688..141b98796e 100644
--- a/c/src/libchip/shmdr/addlq.c
+++ b/c/src/libchip/shmdr/addlq.c
@@ -19,7 +19,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Locked_queue_Add(
Shm_Locked_queue_Control *lq_cb,
diff --git a/c/src/libchip/shmdr/cnvpkt.c b/c/src/libchip/shmdr/cnvpkt.c
index 66dc92a172..616bbad8e7 100644
--- a/c/src/libchip/shmdr/cnvpkt.c
+++ b/c/src/libchip/shmdr/cnvpkt.c
@@ -24,7 +24,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Convert_packet(
rtems_packet_prefix *packet
diff --git a/c/src/libchip/shmdr/dump.c b/c/src/libchip/shmdr/dump.c
index 7b6850083f..10e8e6dbd7 100644
--- a/c/src/libchip/shmdr/dump.c
+++ b/c/src/libchip/shmdr/dump.c
@@ -19,7 +19,7 @@
#include <rtems.h>
#include <stdio.h>
-#include "shm.h"
+#include "shm_driver.h"
void
Shm_Print_statistics(void)
diff --git a/c/src/libchip/shmdr/fatal.c b/c/src/libchip/shmdr/fatal.c
index 6a085ea934..340c65e59e 100644
--- a/c/src/libchip/shmdr/fatal.c
+++ b/c/src/libchip/shmdr/fatal.c
@@ -18,7 +18,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void MPCI_Fatal(
Internal_errors_Source source,
diff --git a/c/src/libchip/shmdr/getlq.c b/c/src/libchip/shmdr/getlq.c
index 9ec31c9605..199721b9ab 100644
--- a/c/src/libchip/shmdr/getlq.c
+++ b/c/src/libchip/shmdr/getlq.c
@@ -21,7 +21,7 @@
*/
#include <rtems.h>
-#include <shm.h>
+#include <shm_driver.h>
Shm_Envelope_control *Shm_Locked_queue_Get(
Shm_Locked_queue_Control *lq_cb
diff --git a/c/src/libchip/shmdr/getpkt.c b/c/src/libchip/shmdr/getpkt.c
index 149bbe75e5..9ed8e42a46 100644
--- a/c/src/libchip/shmdr/getpkt.c
+++ b/c/src/libchip/shmdr/getpkt.c
@@ -20,7 +20,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_mpci_entry Shm_Get_packet(
rtems_packet_prefix **packet
diff --git a/c/src/libchip/shmdr/init.c b/c/src/libchip/shmdr/init.c
index 71350fa3d2..b4ca93a08a 100644
--- a/c/src/libchip/shmdr/init.c
+++ b/c/src/libchip/shmdr/init.c
@@ -20,7 +20,7 @@
#define _SHM_INIT
#include <rtems.h>
-#include <shm.h>
+#include <shm_driver.h>
#include <string.h> /* memset() */
#include <stdlib.h> /* malloc() */
diff --git a/c/src/libchip/shmdr/initlq.c b/c/src/libchip/shmdr/initlq.c
index e93ce6dd3f..e2e0dd1f8c 100644
--- a/c/src/libchip/shmdr/initlq.c
+++ b/c/src/libchip/shmdr/initlq.c
@@ -20,7 +20,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Locked_queue_Initialize(
Shm_Locked_queue_Control *lq_cb,
diff --git a/c/src/libchip/shmdr/intr.c b/c/src/libchip/shmdr/intr.c
index 3b730459a8..3374919222 100644
--- a/c/src/libchip/shmdr/intr.c
+++ b/c/src/libchip/shmdr/intr.c
@@ -23,7 +23,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Cause_interrupt(
rtems_unsigned32 node
diff --git a/c/src/libchip/shmdr/mpci.h b/c/src/libchip/shmdr/mpci.h
index 3afb4034b7..203c77dbcd 100644
--- a/c/src/libchip/shmdr/mpci.h
+++ b/c/src/libchip/shmdr/mpci.h
@@ -21,7 +21,7 @@
extern "C" {
#endif
-#include <shm.h>
+#include <shm_driver.h>
#define MPCI_Initialization( _configuration ) \
Shm_Initialization( _configuration )
@@ -38,7 +38,7 @@ extern "C" {
#define MPCI_Send_packet( _destination, _the_packet ) \
Shm_Send_packet( _destination, _the_packet )
-/* Unnecessary... mapped in shm.h
+/* Unnecessary... mapped in shm_driver.h
#define MPCI_Fatal( _the_error ) \
Shm_Fatal( _the_error )
*/
diff --git a/c/src/libchip/shmdr/mpisr.c b/c/src/libchip/shmdr/mpisr.c
index da07e0279f..fc761101cd 100644
--- a/c/src/libchip/shmdr/mpisr.c
+++ b/c/src/libchip/shmdr/mpisr.c
@@ -11,7 +11,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_isr Shm_isr(
rtems_vector_number vector
diff --git a/c/src/libchip/shmdr/poll.c b/c/src/libchip/shmdr/poll.c
index ec428bb74c..9c3571ae22 100644
--- a/c/src/libchip/shmdr/poll.c
+++ b/c/src/libchip/shmdr/poll.c
@@ -22,7 +22,7 @@
#include <rtems/score/sysstate.h>
#include <rtems/libio.h>
-#include "shm.h"
+#include "shm_driver.h"
void Shm_Poll()
{
diff --git a/c/src/libchip/shmdr/receive.c b/c/src/libchip/shmdr/receive.c
index 5b8cd2e9e8..8d1b2349f7 100644
--- a/c/src/libchip/shmdr/receive.c
+++ b/c/src/libchip/shmdr/receive.c
@@ -22,7 +22,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_mpci_entry Shm_Receive_packet(
rtems_packet_prefix **packet
diff --git a/c/src/libchip/shmdr/retpkt.c b/c/src/libchip/shmdr/retpkt.c
index 027a9a7659..c013916603 100644
--- a/c/src/libchip/shmdr/retpkt.c
+++ b/c/src/libchip/shmdr/retpkt.c
@@ -20,7 +20,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_mpci_entry Shm_Return_packet(
rtems_packet_prefix *packet
diff --git a/c/src/libchip/shmdr/send.c b/c/src/libchip/shmdr/send.c
index 4ffdd5d905..2e5f60988e 100644
--- a/c/src/libchip/shmdr/send.c
+++ b/c/src/libchip/shmdr/send.c
@@ -22,7 +22,7 @@
*/
#include <rtems.h>
-#include "shm.h"
+#include "shm_driver.h"
struct pkt_cpy {
rtems_unsigned32 packet[MAX_PACKET_SIZE/4];
diff --git a/c/src/libchip/shmdr/setckvec.c b/c/src/libchip/shmdr/setckvec.c
index 770b695903..9be1b48945 100644
--- a/c/src/libchip/shmdr/setckvec.c
+++ b/c/src/libchip/shmdr/setckvec.c
@@ -20,7 +20,7 @@
#include <rtems.h>
#include <rtems/libio.h>
-#include "shm.h"
+#include "shm_driver.h"
rtems_isr Shm_setclockvec()
{
diff --git a/c/src/libchip/shmdr/shm_driver.h b/c/src/libchip/shmdr/shm_driver.h
index 2f212fd759..7efc9dbfcb 100644
--- a/c/src/libchip/shmdr/shm_driver.h
+++ b/c/src/libchip/shmdr/shm_driver.h
@@ -1,4 +1,4 @@
-/* shm.h
+/* shm_driver.h
*
* This include file contains all the constants, structures,
* and global variables for this RTEMS based shared memory
@@ -145,7 +145,7 @@ extern "C" {
#define SHM_LOCK_VALUE 1
#define SHM_UNLOCK_VALUE 0
#else
-#error "shm.h - no SHM_LOCK_VALUE defined for this CPU architecture"
+#error "shm_driver.h - no SHM_LOCK_VALUE defined for this CPU architecture"
#endif
#define Shm_Convert( value ) \