aboutsummaryrefslogtreecommitdiffstats
path: root/os/common
diff options
context:
space:
mode:
authorgdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01>2018-12-16 08:35:02 +0000
committergdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01>2018-12-16 08:35:02 +0000
commit0ea08f4a96ca331276fa6162d6eb4335d9805ae4 (patch)
tree1c3ca88e8d507929c8dfc74af48916bcc33f7986 /os/common
parentec272fe9bab0c2e679833e84c942e81618ccaf76 (diff)
downloadChibiOS-0ea08f4a96ca331276fa6162d6eb4335d9805ae4.tar.gz
ChibiOS-0ea08f4a96ca331276fa6162d6eb4335d9805ae4.tar.bz2
ChibiOS-0ea08f4a96ca331276fa6162d6eb4335d9805ae4.zip
Added extern "C" declarations to IRQ macros.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12475 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/common')
-rw-r--r--os/common/ports/ARM/chcore.h4
-rw-r--r--os/common/ports/ARMCAx-TZ/chcore.h7
-rw-r--r--os/common/ports/ARMCMx/chcore_v6m.h8
-rw-r--r--os/common/ports/ARMCMx/chcore_v7m.h8
-rw-r--r--os/common/ports/SIMIA32/chcore.h8
-rw-r--r--os/common/ports/e200/chcore.h8
-rw-r--r--os/common/ports/templates/chcore.h8
7 files changed, 49 insertions, 2 deletions
diff --git a/os/common/ports/ARM/chcore.h b/os/common/ports/ARM/chcore.h
index cc3c6fa53..d9f56d016 100644
--- a/os/common/ports/ARM/chcore.h
+++ b/os/common/ports/ARM/chcore.h
@@ -332,7 +332,11 @@ struct port_context {
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_IRQ_HANDLER(id) extern "C" bool id(void)
+#else
#define PORT_IRQ_HANDLER(id) bool id(void)
+#endif
/**
* @brief Fast IRQ handler function declaration.
diff --git a/os/common/ports/ARMCAx-TZ/chcore.h b/os/common/ports/ARMCAx-TZ/chcore.h
index d31f0f736..67f6395f9 100644
--- a/os/common/ports/ARMCAx-TZ/chcore.h
+++ b/os/common/ports/ARMCAx-TZ/chcore.h
@@ -297,8 +297,11 @@ struct port_context {
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
-#define PORT_IRQ_HANDLER(id) \
- bool id(void)
+#ifdef __cplusplus
+#define PORT_IRQ_HANDLER(id) extern "C" bool id(void)
+#else
+#define PORT_IRQ_HANDLER(id) bool id(void)
+#endif
/**
* @brief Fast IRQ handler function declaration.
diff --git a/os/common/ports/ARMCMx/chcore_v6m.h b/os/common/ports/ARMCMx/chcore_v6m.h
index d895f84a8..eb1193600 100644
--- a/os/common/ports/ARMCMx/chcore_v6m.h
+++ b/os/common/ports/ARMCMx/chcore_v6m.h
@@ -269,14 +269,22 @@ struct port_intctx {
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Fast IRQ handler function declaration.
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_FAST_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_FAST_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Performs a context switch between two threads.
diff --git a/os/common/ports/ARMCMx/chcore_v7m.h b/os/common/ports/ARMCMx/chcore_v7m.h
index 28e18239c..408568cc8 100644
--- a/os/common/ports/ARMCMx/chcore_v7m.h
+++ b/os/common/ports/ARMCMx/chcore_v7m.h
@@ -435,14 +435,22 @@ struct port_intctx {
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Fast IRQ handler function declaration.
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_FAST_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_FAST_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Performs a context switch between two threads.
diff --git a/os/common/ports/SIMIA32/chcore.h b/os/common/ports/SIMIA32/chcore.h
index ba86c2f19..e6b254c33 100644
--- a/os/common/ports/SIMIA32/chcore.h
+++ b/os/common/ports/SIMIA32/chcore.h
@@ -266,14 +266,22 @@ struct port_context {
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Fast IRQ handler function declaration.
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_FAST_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_FAST_IRQ_HANDLER(id) void id(void)
+#endif
/*===========================================================================*/
/* External declarations. */
diff --git a/os/common/ports/e200/chcore.h b/os/common/ports/e200/chcore.h
index aabe70fee..dd6861fd2 100644
--- a/os/common/ports/e200/chcore.h
+++ b/os/common/ports/e200/chcore.h
@@ -403,14 +403,22 @@ struct port_context {
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Fast IRQ handler function declaration.
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_FAST_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_FAST_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Priority level verification macro.
diff --git a/os/common/ports/templates/chcore.h b/os/common/ports/templates/chcore.h
index 98c4b9502..e3dc48d8e 100644
--- a/os/common/ports/templates/chcore.h
+++ b/os/common/ports/templates/chcore.h
@@ -248,14 +248,22 @@ struct port_context {
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Fast IRQ handler function declaration.
* @note @p id can be a function name or a vector number depending on the
* port implementation.
*/
+#ifdef __cplusplus
+#define PORT_FAST_IRQ_HANDLER(id) extern "C" void id(void)
+#else
#define PORT_FAST_IRQ_HANDLER(id) void id(void)
+#endif
/**
* @brief Performs a context switch between two threads.