logging: set 'log_backend_rtt:panic_mode' before 'log_backend_std_panic'

Set 'log_backend_rtt:panic_mode' before calling 'log_backend_std_panic',
because otherwise the RTT backend behaves as if the system is NOT
panicking and tries to do asynchronous writes via RTT_LOCK/UNLOCK.

Signed-Off-By: Andrew Fernandes <andrew@fernandes.org>
This commit is contained in:
Andrew Fernandes 2020-05-27 14:47:49 -07:00 committed by Carles Cufí
commit 4653b4e63f

View file

@ -257,8 +257,8 @@ static void log_backend_rtt_init(void)
static void panic(struct log_backend const *const backend)
{
log_backend_std_panic(&log_output);
panic_mode = true;
log_backend_std_panic(&log_output);
}
static void dropped(const struct log_backend *const backend, u32_t cnt)