Skip to content
Snippets Groups Projects
Commit 58168c8e authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

zephyr/zephyr_getchar: Explicitly yield to other threads on char availability.

Without this, if there's a large chunk of data coming from hardware (e.g.
clipboard paste, or fed programmatically from the other side of the console),
there's a behavior of initial mass fill-in of the buffer without any
consumption, which starts much later and doesn't catch up with further
filling, leading to buffer overflow.
parent 468c6f9d
Branches
Tags
No related merge requests found
......@@ -44,6 +44,7 @@ static int console_irq_input_hook(uint8_t ch)
}
//printk("%x\n", ch);
k_sem_give(&uart_sem);
k_yield();
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment