mirror of https://github.com/ARMmbed/mbed-os.git
astyle to mbed_error.c
parent
5671416d5e
commit
db1e2d3b24
|
@ -169,16 +169,13 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MBED_CONF_RTOS_PRESENT
|
#ifdef MBED_CONF_RTOS_PRESENT
|
||||||
if (mfc && !(mfc->EXC_RETURN & 0x4))
|
if (mfc && !(mfc->EXC_RETURN & 0x4)) {
|
||||||
{
|
|
||||||
// handler mode
|
// handler mode
|
||||||
current_error_ctx.thread_id = 0;
|
current_error_ctx.thread_id = 0;
|
||||||
current_error_ctx.thread_entry_address = 0;
|
current_error_ctx.thread_entry_address = 0;
|
||||||
current_error_ctx.thread_stack_size = MAX(0, INITIAL_SP - current_error_ctx.thread_current_sp - sizeof(int));
|
current_error_ctx.thread_stack_size = MAX(0, INITIAL_SP - current_error_ctx.thread_current_sp - sizeof(int));
|
||||||
current_error_ctx.thread_stack_mem = current_error_ctx.thread_current_sp;
|
current_error_ctx.thread_stack_mem = current_error_ctx.thread_current_sp;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// Capture thread info in thread mode
|
// Capture thread info in thread mode
|
||||||
osRtxThread_t *current_thread = osRtxInfo.thread.run.curr;
|
osRtxThread_t *current_thread = osRtxInfo.thread.run.curr;
|
||||||
current_error_ctx.thread_id = (uint32_t)current_thread;
|
current_error_ctx.thread_id = (uint32_t)current_thread;
|
||||||
|
@ -470,8 +467,9 @@ mbed_error_status_t mbed_clear_all_errors(void)
|
||||||
|
|
||||||
static inline const char *name_or_unnamed(const osRtxThread_t *thread)
|
static inline const char *name_or_unnamed(const osRtxThread_t *thread)
|
||||||
{
|
{
|
||||||
if (!thread)
|
if (!thread) {
|
||||||
return "<handler>";
|
return "<handler>";
|
||||||
|
}
|
||||||
|
|
||||||
const char *name = thread->name;
|
const char *name = thread->name;
|
||||||
return name ? name : "<unnamed>";
|
return name ? name : "<unnamed>";
|
||||||
|
|
Loading…
Reference in New Issue