diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2021-03-10 09:47:56 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-03-17 11:55:30 +0100 |
commit | 5f129c98629190827dcd387ac79e0076bbc0eb25 (patch) | |
tree | decd99b692c7961bef370561eee842b3d24dabf7 /lib/readline.c | |
parent | 10349680225215a4f809e597f67cc3260c68ea75 (diff) | |
download | barebox-5f129c98629190827dcd387ac79e0076bbc0eb25.tar.gz |
common: poller: replace explicit calls to poller_call() with resched()
We won't replace pollers with bthreads completely over night. To make
migration easier, replace explicit calls to poller_call with a new
resched() function. This can be made to call bthread_reschedule() in
future and eventually replaced with bthread_reschedule() once pollers
are removed.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/readline.c')
-rw-r--r-- | lib/readline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/readline.c b/lib/readline.c index e5370f9c7b..25aa99b95e 100644 --- a/lib/readline.c +++ b/lib/readline.c @@ -2,7 +2,7 @@ #include <readkey.h> #include <init.h> #include <libbb.h> -#include <poller.h> +#include <sched.h> #include <xfuncs.h> #include <complete.h> #include <linux/ctype.h> @@ -200,7 +200,7 @@ int readline(const char *prompt, char *buf, int len) while (1) { while (!tstc()) - poller_call(); + resched(); ichar = read_key(); |