[rtems commit] bsps/sparc: Add common gnat handler function prototype.
Joel Sherrill
joel at rtems.org
Mon Mar 24 16:38:09 UTC 2014
Module: rtems
Branch: master
Commit: 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd
Changeset: http://git.rtems.org/rtems/commit/?id=52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd
Author: Daniel Cederman <cederman at gaisler.com>
Date: Thu Mar 13 14:13:55 2014 +0100
bsps/sparc: Add common gnat handler function prototype.
Moved prototype for __gnat_install_handler and __gnat_install_handler_common to common header file. Placed header file in bsp namespace.
---
c/src/lib/libbsp/sparc/Makefile.am | 1 +
c/src/lib/libbsp/sparc/erc32/Makefile.am | 3 ++-
c/src/lib/libbsp/sparc/erc32/gnatsupp/gnatsupp.c | 2 +-
c/src/lib/libbsp/sparc/erc32/preinstall.am | 4 ++++
c/src/lib/libbsp/sparc/leon2/Makefile.am | 3 ++-
c/src/lib/libbsp/sparc/leon2/gnatsupp/gnatsupp.c | 2 +-
c/src/lib/libbsp/sparc/leon2/preinstall.am | 4 ++++
c/src/lib/libbsp/sparc/leon3/Makefile.am | 3 ++-
c/src/lib/libbsp/sparc/leon3/gnatsupp/gnatsupp.c | 2 +-
c/src/lib/libbsp/sparc/leon3/preinstall.am | 4 ++++
c/src/lib/libbsp/sparc/shared/gnatcommon.c | 1 +
c/src/lib/libbsp/sparc/shared/include/gnatcommon.h | 19 +++++++++++++++++++
12 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/Makefile.am b/c/src/lib/libbsp/sparc/Makefile.am
index 3508d89..3d433fb 100644
--- a/c/src/lib/libbsp/sparc/Makefile.am
+++ b/c/src/lib/libbsp/sparc/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS = @RTEMS_BSP_FAMILY@
EXTRA_DIST =
EXTRA_DIST += shared/gnatcommon.c
+EXTRA_DIST += shared/include/gnatcommon.h
EXTRA_DIST += shared/start/start.S
# Interrupt
diff --git a/c/src/lib/libbsp/sparc/erc32/Makefile.am b/c/src/lib/libbsp/sparc/erc32/Makefile.am
index 677c44e..1cd3d2f 100644
--- a/c/src/lib/libbsp/sparc/erc32/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/Makefile.am
@@ -39,6 +39,7 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
libbsp_a_SOURCES += ../../sparc/shared/irq_asm.S
# gnatsupp
libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
+include_bsp_HEADERS = ../shared/include/gnatcommon.h
# console
libbsp_a_SOURCES += console/erc32_console.c ../../shared/console.c \
../../shared/console_select.c ../../shared/console_control.c \
@@ -52,7 +53,7 @@ libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
libbsp_a_SOURCES += timer/timer.c
# IRQ
-include_bsp_HEADERS = \
+include_bsp_HEADERS += \
../../shared/include/irq-generic.h \
../../shared/include/irq-info.h \
include/bsp/irq.h
diff --git a/c/src/lib/libbsp/sparc/erc32/gnatsupp/gnatsupp.c b/c/src/lib/libbsp/sparc/erc32/gnatsupp/gnatsupp.c
index ebab714..bc70883 100644
--- a/c/src/lib/libbsp/sparc/erc32/gnatsupp/gnatsupp.c
+++ b/c/src/lib/libbsp/sparc/erc32/gnatsupp/gnatsupp.c
@@ -4,7 +4,7 @@
* Jiri Gaisler, ESA/ESTEC, 17-02-1999.
*/
-void __gnat_install_handler_common( int, int );
+#include <bsp/gnatcommon.h>
void
__gnat_install_handler (void)
diff --git a/c/src/lib/libbsp/sparc/erc32/preinstall.am b/c/src/lib/libbsp/sparc/erc32/preinstall.am
index a235296..71ef19e 100644
--- a/c/src/lib/libbsp/sparc/erc32/preinstall.am
+++ b/c/src/lib/libbsp/sparc/erc32/preinstall.am
@@ -73,6 +73,10 @@ $(PROJECT_LIB)/linkcmds.base: ../shared/startup/linkcmds.base $(PROJECT_LIB)/$(d
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
+$(PROJECT_INCLUDE)/bsp/gnatcommon.h: ../shared/include/gnatcommon.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+
$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
diff --git a/c/src/lib/libbsp/sparc/leon2/Makefile.am b/c/src/lib/libbsp/sparc/leon2/Makefile.am
index c08f159..98bc299 100644
--- a/c/src/lib/libbsp/sparc/leon2/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon2/Makefile.am
@@ -56,13 +56,14 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
libbsp_a_SOURCES += ../../sparc/shared/irq_asm.S
# gnatsupp
libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
+include_bsp_HEADERS = ../shared/include/gnatcommon.h
# console
libbsp_a_SOURCES += console/console.c console/debugputs.c
# clock
libbsp_a_SOURCES += clock/ckinit.c
libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
# IRQ
-include_bsp_HEADERS = \
+include_bsp_HEADERS += \
../../shared/include/irq-generic.h \
../../shared/include/irq-info.h \
include/bsp/irq.h
diff --git a/c/src/lib/libbsp/sparc/leon2/gnatsupp/gnatsupp.c b/c/src/lib/libbsp/sparc/leon2/gnatsupp/gnatsupp.c
index b3a7c18..820252d 100644
--- a/c/src/lib/libbsp/sparc/leon2/gnatsupp/gnatsupp.c
+++ b/c/src/lib/libbsp/sparc/leon2/gnatsupp/gnatsupp.c
@@ -10,7 +10,7 @@
* Jiri Gaisler, ESA/ESTEC, 17-02-1999.
*/
-void __gnat_install_handler_common (int t1, int t2);
+#include <bsp/gnatcommon.h>
/*
* Avoid trap 0x18 which is used by the clock tick, and
diff --git a/c/src/lib/libbsp/sparc/leon2/preinstall.am b/c/src/lib/libbsp/sparc/leon2/preinstall.am
index 84aa2b4..006bb70 100644
--- a/c/src/lib/libbsp/sparc/leon2/preinstall.am
+++ b/c/src/lib/libbsp/sparc/leon2/preinstall.am
@@ -141,6 +141,10 @@ $(PROJECT_LIB)/linkcmds.base: ../shared/startup/linkcmds.base $(PROJECT_LIB)/$(d
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
+$(PROJECT_INCLUDE)/bsp/gnatcommon.h: ../shared/include/gnatcommon.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+
$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am
index 3c87e18..a9c1448 100644
--- a/c/src/lib/libbsp/sparc/leon3/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am
@@ -45,6 +45,7 @@ libbsp_a_SOURCES += startup/cpucounter.c
libbsp_a_SOURCES += ../../sparc/shared/irq_asm.S
# gnatsupp
libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
+include_bsp_HEADERS = ../shared/include/gnatcommon.h
# AMBA bus
include_HEADERS += include/amba.h
include_HEADERS += ../../sparc/shared/include/ambapp.h
@@ -69,7 +70,7 @@ libbsp_a_SOURCES += console/printk_support.c
libbsp_a_SOURCES += clock/ckinit.c
libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
# IRQ
-include_bsp_HEADERS = \
+include_bsp_HEADERS += \
../../shared/include/irq-generic.h \
../../shared/include/irq-info.h \
include/bsp/irq.h
diff --git a/c/src/lib/libbsp/sparc/leon3/gnatsupp/gnatsupp.c b/c/src/lib/libbsp/sparc/leon3/gnatsupp/gnatsupp.c
index 4b1056f..3190627 100644
--- a/c/src/lib/libbsp/sparc/leon3/gnatsupp/gnatsupp.c
+++ b/c/src/lib/libbsp/sparc/leon3/gnatsupp/gnatsupp.c
@@ -8,7 +8,7 @@
* Jiri Gaisler, ESA/ESTEC, 17-02-1999.
*/
-void __gnat_install_handler_common (int t1, int t2);
+#include <bsp/gnatcommon.h>
/*
* Avoid trap 0x18 which is used by the clock tick, and
diff --git a/c/src/lib/libbsp/sparc/leon3/preinstall.am b/c/src/lib/libbsp/sparc/leon3/preinstall.am
index 0005edd..33e9041 100644
--- a/c/src/lib/libbsp/sparc/leon3/preinstall.am
+++ b/c/src/lib/libbsp/sparc/leon3/preinstall.am
@@ -85,6 +85,10 @@ $(PROJECT_LIB)/linkcmds.ngmp: startup/linkcmds.ngmp $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.ngmp
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.ngmp
+$(PROJECT_INCLUDE)/bsp/gnatcommon.h: ../shared/include/gnatcommon.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+
$(PROJECT_INCLUDE)/amba.h: include/amba.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/amba.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/amba.h
diff --git a/c/src/lib/libbsp/sparc/shared/gnatcommon.c b/c/src/lib/libbsp/sparc/shared/gnatcommon.c
index 4128982..b8a276c 100644
--- a/c/src/lib/libbsp/sparc/shared/gnatcommon.c
+++ b/c/src/lib/libbsp/sparc/shared/gnatcommon.c
@@ -11,6 +11,7 @@
#include <rtems/bspIo.h>
#include <signal.h>
#include <stdlib.h>
+#include <bsp/gnatcommon.h>
/*
* Synchronous trap handler. Map the trap number of SIGFPE, SIGSEGV
diff --git a/c/src/lib/libbsp/sparc/shared/include/gnatcommon.h b/c/src/lib/libbsp/sparc/shared/include/gnatcommon.h
new file mode 100644
index 0000000..1a04449
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/shared/include/gnatcommon.h
@@ -0,0 +1,19 @@
+#ifndef __GNATCOMMON_H
+#define __GNATCOMMON_H
+
+/*
+ * Support for gnat/rtems interrupts and exception handling.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void __gnat_install_handler (void);
+void __gnat_install_handler_common (int t1, int t2);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
More information about the vc
mailing list