Skip to content

Commit

Permalink
arch: arm: Allow NMI handlers to be registered from C++
Browse files Browse the repository at this point in the history
This exports the API function with C-linkage so that it can be used in a
C++ application.

Signed-off-by: Benjamin Gwin <bgwin@google.com>
  • Loading branch information
Benjamin Gwin authored and kartben committed Jan 10, 2025
1 parent c4fd9ea commit acc5f20
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/zephyr/arch/arm/nmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */

0 comments on commit acc5f20

Please sign in to comment.