Browse Source

Keep running the main processing loop while waiting for input.

tags/v0.9.3
Michael Brown 18 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
 #include "stddef.h"
1
 #include "stddef.h"
2
 #include "console.h"
2
 #include "console.h"
3
+#include <gpxe/process.h>
3
 
4
 
4
 /** @file */
5
 /** @file */
5
 
6
 
97
 		 * less CPU time in a VMware session.
98
 		 * less CPU time in a VMware session.
98
 		 */
99
 		 */
99
 		cpu_nap();
100
 		cpu_nap();
101
+
102
+		/* Keep processing background tasks while we wait for
103
+		 * input.
104
+		 */
105
+		step();
100
 		
106
 		
101
 		console = has_input();
107
 		console = has_input();
102
 		if ( console && console->getchar )
108
 		if ( console && console->getchar )

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

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

Loading…
Cancel
Save