lib: time: hook uthread_schedule() into udelay()
authorJerome Forissier <jerome.forissier@linaro.org>
Fri, 18 Apr 2025 14:09:37 +0000 (16:09 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 23 Apr 2025 19:19:44 +0000 (13:19 -0600)
commit2325621fff219ee3b80641f714545f8b33013c0c
treeac412db17bc7a6e4bf1d823cd8e384d5b7bf812e
parente831370af5102d8059d4f20d3317e2c39565e9af
lib: time: hook uthread_schedule() into udelay()

Introduce a uthread scheduling loop into udelay() when CONFIG_UTHREAD
is enabled. This means that any uthread calling into udelay() may yield
to uthread and be scheduled again later. There is no delay in the
scheduling loop because tests have shown that such a delay can have a
detrimental effect on the console (input drops characters).

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/time.c