]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
Keep running the main processing loop while waiting for input.
authorMichael Brown <mcb30@etherboot.org>
Wed, 27 Dec 2006 22:59:40 +0000 (22:59 +0000)
committerMichael Brown <mcb30@etherboot.org>
Wed, 27 Dec 2006 22:59:40 +0000 (22:59 +0000)
src/core/console.c
src/core/getkey.c

index cd3239d6f7464674e55b11b777fe3d1315b97ef8..830f4539059429020782a847b67b2853b7e6a51a 100644 (file)
@@ -1,5 +1,6 @@
 #include "stddef.h"
 #include "console.h"
+#include <gpxe/process.h>
 
 /** @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 )
index 20528ffcd74a628985037fba27a4dedc51e5ab80..71ec6cc1be4bdd236ae85dd7589d3512aa18f8f2 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <console.h>
 #include <latch.h>
+#include <gpxe/process.h>
 #include <gpxe/keys.h>
 
 /** @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();
        }