logger: rtt backend don't let starve others in blocking mode

When a RTT logger backend is configured to blocks, allow other threads
to continue during waiting for data to be transferred to host.

Signed-off-by: Pavel Kral <pavel.kral@omsquare.com>
This commit is contained in:
Pavel Kral 2018-11-02 10:33:31 +01:00 committed by Anas Nashif
commit e781997450

View file

@ -224,7 +224,9 @@ static void panic(struct log_backend const *const backend)
static void log_backend_rtt_flush(void)
{
while (SEGGER_RTT_HasDataUp(CONFIG_LOG_BACKEND_RTT_BUFFER)) {
/* pass */
if (!panic_mode) {
k_yield();
}
}
}