From: Michael Brown Date: Wed, 27 Dec 2006 22:59:40 +0000 (+0000) Subject: Keep running the main processing loop while waiting for input. X-Git-Tag: v0.9.3~824 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6def29f2be0d6b2d84085eeff74299a04f99b33;p=thirdparty%2Fipxe.git Keep running the main processing loop while waiting for input. --- diff --git a/src/core/console.c b/src/core/console.c index cd3239d6f..830f45390 100644 --- a/src/core/console.c +++ b/src/core/console.c @@ -1,5 +1,6 @@ #include "stddef.h" #include "console.h" +#include /** @file */ @@ -97,6 +98,11 @@ int getchar ( void ) { * less CPU time in a VMware session. */ cpu_nap(); + + /* Keep processing background tasks while we wait for + * input. + */ + step(); console = has_input(); if ( console && console->getchar ) diff --git a/src/core/getkey.c b/src/core/getkey.c index 20528ffcd..71ec6cc1b 100644 --- a/src/core/getkey.c +++ b/src/core/getkey.c @@ -18,6 +18,7 @@ #include #include +#include #include /** @file @@ -38,6 +39,7 @@ static int getchar_timeout ( unsigned long timeout ) { unsigned long expiry = ( currticks() + timeout ); while ( currticks() < expiry ) { + step(); if ( iskey() ) return getchar(); }