From 998f90544540ee563d69369a3dfa80944f2269bf Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Wed, 7 Jun 2017 10:40:29 -0700 Subject: [PATCH] arches: declare _SysFatalErrorHandler __weak This function is intended to be easily overridable by applications. Signed-off-by: Andrew Boie --- arch/arc/core/sys_fatal_error_handler.c | 4 ++-- arch/arm/core/sys_fatal_error_handler.c | 2 +- arch/nios2/core/fatal.c | 4 ++-- arch/riscv32/core/fatal.c | 3 ++- arch/x86/core/sys_fatal_error_handler.c | 2 +- arch/xtensa/core/fatal.c | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arc/core/sys_fatal_error_handler.c b/arch/arc/core/sys_fatal_error_handler.c index 35b768f2b18..09f6c34690d 100644 --- a/arch/arc/core/sys_fatal_error_handler.c +++ b/arch/arc/core/sys_fatal_error_handler.c @@ -37,8 +37,8 @@ * * @return N/A */ -FUNC_NORETURN void _SysFatalErrorHandler(unsigned int reason, - const NANO_ESF *pEsf) +FUNC_NORETURN __weak void _SysFatalErrorHandler(unsigned int reason, + const NANO_ESF *pEsf) { ARG_UNUSED(pEsf); diff --git a/arch/arm/core/sys_fatal_error_handler.c b/arch/arm/core/sys_fatal_error_handler.c index 6684f76d15e..594cefbfa4b 100644 --- a/arch/arm/core/sys_fatal_error_handler.c +++ b/arch/arm/core/sys_fatal_error_handler.c @@ -38,7 +38,7 @@ * * @return N/A */ -void _SysFatalErrorHandler(unsigned int reason, +void __weak _SysFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf) { ARG_UNUSED(pEsf); diff --git a/arch/nios2/core/fatal.c b/arch/nios2/core/fatal.c index ee9664e18e0..5a8d5e020d9 100644 --- a/arch/nios2/core/fatal.c +++ b/arch/nios2/core/fatal.c @@ -220,8 +220,8 @@ FUNC_NORETURN void _Fault(const NANO_ESF *esf) * * @return N/A */ -FUNC_NORETURN void _SysFatalErrorHandler(unsigned int reason, - const NANO_ESF *pEsf) +FUNC_NORETURN __weak void _SysFatalErrorHandler(unsigned int reason, + const NANO_ESF *pEsf) { ARG_UNUSED(pEsf); diff --git a/arch/riscv32/core/fatal.c b/arch/riscv32/core/fatal.c index 91cc61d4de0..158a3aba1a4 100644 --- a/arch/riscv32/core/fatal.c +++ b/arch/riscv32/core/fatal.c @@ -134,7 +134,8 @@ FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int reason, * * @return N/A */ -void _SysFatalErrorHandler(unsigned int reason, const NANO_ESF *esf) +FUNC_NORETURN __weak void _SysFatalErrorHandler(unsigned int reason, + const NANO_ESF *esf) { ARG_UNUSED(esf); diff --git a/arch/x86/core/sys_fatal_error_handler.c b/arch/x86/core/sys_fatal_error_handler.c index faf1ba54d3b..e15a734e4e4 100644 --- a/arch/x86/core/sys_fatal_error_handler.c +++ b/arch/x86/core/sys_fatal_error_handler.c @@ -38,7 +38,7 @@ * * @return This function does not return. */ -FUNC_NORETURN void _SysFatalErrorHandler(unsigned int reason, +FUNC_NORETURN __weak void _SysFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf) { ARG_UNUSED(pEsf); diff --git a/arch/xtensa/core/fatal.c b/arch/xtensa/core/fatal.c index 4e5c10035b0..7b75fb09f1c 100644 --- a/arch/xtensa/core/fatal.c +++ b/arch/xtensa/core/fatal.c @@ -235,7 +235,7 @@ void exit(int return_code) * * @return N/A */ -FUNC_NORETURN void _SysFatalErrorHandler(unsigned int reason, +FUNC_NORETURN __weak void _SysFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf) { ARG_UNUSED(pEsf);