Skip to content

Commit

Permalink
kernel/os: Update os_assert_cb to match assert_func
Browse files Browse the repository at this point in the history
This updates os_assert_cb prototype to match assert_func. This allows to
get proper assert information in callback e.g. for logging.
  • Loading branch information
andrzej-kaczmarek committed Nov 26, 2024
1 parent c69fb80 commit 6c81609
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kernel/os/include/os/arch/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ os_error_t os_arch_os_start(void);
void os_set_env(os_stack_t *);
void os_arch_init_task_stack(os_stack_t *sf);
void os_default_irq_asm(void);
void os_assert_cb(void);
void os_assert_cb(const char *file, int line, const char *func, const char *e);
void os_coredump_cb(void *tf);

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion kernel/os/src/arch/cortex_m4/os_fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ __assert_func(const char *file, int line, const char *func, const char *e)
#endif

#if MYNEWT_VAL(OS_ASSERT_CB)
os_assert_cb();
os_assert_cb(file, line, func, e);
#endif

SCB->ICSR = SCB_ICSR_NMIPENDSET_Msk;
Expand Down

0 comments on commit 6c81609

Please sign in to comment.