From acc5f20357a803e92d9efc1007ccd1e486acf609 Mon Sep 17 00:00:00 2001 From: Benjamin Gwin Date: Mon, 6 Jan 2025 23:54:47 +0000 Subject: [PATCH] arch: arm: Allow NMI handlers to be registered from C++ This exports the API function with C-linkage so that it can be used in a C++ application. Signed-off-by: Benjamin Gwin --- include/zephyr/arch/arm/nmi.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/zephyr/arch/arm/nmi.h b/include/zephyr/arch/arm/nmi.h index 33f46084248ed9..1f92456fe12deb 100644 --- a/include/zephyr/arch/arm/nmi.h +++ b/include/zephyr/arch/arm/nmi.h @@ -13,8 +13,16 @@ #ifndef ZEPHYR_INCLUDE_ARCH_ARM_NMI_H_ #define ZEPHYR_INCLUDE_ARCH_ARM_NMI_H_ +#ifdef __cplusplus +extern "C" { +#endif + #if !defined(_ASMLANGUAGE) && defined(CONFIG_RUNTIME_NMI) extern void z_arm_nmi_set_handler(void (*pHandler)(void)); #endif +#ifdef __cplusplus +} +#endif + #endif /* ZEPHYR_INCLUDE_ARCH_ARM_NMI_H_ */