Browse Source

Keep running the main processing loop while waiting for input.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
b6def29f2b
2 changed files with 8 additions and 0 deletions
  1. 6
    0
      src/core/console.c
  2. 2
    0
      src/core/getkey.c

+ 6
- 0
src/core/console.c View File

@@ -1,5 +1,6 @@
1 1
 #include "stddef.h"
2 2
 #include "console.h"
3
+#include <gpxe/process.h>
3 4
 
4 5
 /** @file */
5 6
 
@@ -97,6 +98,11 @@ int getchar ( void ) {
97 98
 		 * less CPU time in a VMware session.
98 99
 		 */
99 100
 		cpu_nap();
101
+
102
+		/* Keep processing background tasks while we wait for
103
+		 * input.
104
+		 */
105
+		step();
100 106
 		
101 107
 		console = has_input();
102 108
 		if ( console && console->getchar )

+ 2
- 0
src/core/getkey.c View File

@@ -18,6 +18,7 @@
18 18
 
19 19
 #include <console.h>
20 20
 #include <latch.h>
21
+#include <gpxe/process.h>
21 22
 #include <gpxe/keys.h>
22 23
 
23 24
 /** @file
@@ -38,6 +39,7 @@ static int getchar_timeout ( unsigned long timeout ) {
38 39
 	unsigned long expiry = ( currticks() + timeout );
39 40
 
40 41
 	while ( currticks() < expiry ) {
42
+		step();
41 43
 		if ( iskey() )
42 44
 			return getchar();
43 45
 	}

Loading…
Cancel
Save