From 2e87156dd8de48a7a8bce0381eae67e028622081 Mon Sep 17 00:00:00 2001 From: Clay Wynn Date: Mon, 9 Jun 2025 16:10:39 -0700 Subject: [PATCH] os: add __weak to to assert_print to allow customization System designers may want to change the behavior of assert_print, such as storing the message off into retained RAM and instantly rebooting. Adding __weak allows customatization Signed-off-by: Clay Wynn --- lib/os/assert.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/os/assert.c b/lib/os/assert.c index 1fee487bff64e..4f37f62d031b7 100644 --- a/lib/os/assert.c +++ b/lib/os/assert.c @@ -44,7 +44,17 @@ __weak void assert_post_action(const char *file, unsigned int line) } EXPORT_SYMBOL(assert_post_action); -void assert_print(const char *fmt, ...) +/** + * @brief Assert Print Handler + * + * This routine implements printing the assertion message. + * + * System designers may wish to substitute this implementation to store the + * assertion, or otherwise change the behavior of the assertion print + * + * @param N/A + */ +__weak void assert_print(const char *fmt, ...) { va_list ap;