From 26e9ae103af428b82d8d87f2ca15888b770eff9c Mon Sep 17 00:00:00 2001 From: Kevin Bracey Date: Tue, 9 Apr 2019 16:05:31 +0300 Subject: [PATCH] mbed_assert_failure: Don't take critical section Assert failure took a critical section before calling `mbed_error`. There's no need to take a critical section on assert failure - mbed_error does not do this, and is designed to operate from normal contexts. Avoiding the critical section will improve the chances of console initialisation due to assert failure working nicely. --- platform/mbed_assert.c | 1 - 1 file changed, 1 deletion(-) diff --git a/platform/mbed_assert.c b/platform/mbed_assert.c index 5ed490a110..0871bab9e9 100644 --- a/platform/mbed_assert.c +++ b/platform/mbed_assert.c @@ -23,7 +23,6 @@ MBED_NORETURN void mbed_assert_internal(const char *expr, const char *file, int line) { - core_util_critical_section_enter(); mbed_error(MBED_ERROR_ASSERTION_FAILED, expr, 0, file, line); }