Avoid calling cpu_nap() until after we have determined that there is no input ready to read. This avoids delaying for one timer interrupt (~50ms) in the case of if ( iskey() ) char = getkey() which happens to be present in monojob.c, which is where we spend most of our time looping (e.g. during any download). This should eliminate the irritating tendency of gPXE to lose keypresses. Discovered on a Dell system where the serial port seems to send in a constant stream of 0xff characters; this wouldn't be a problem in itself except that each one triggers the 50ms delay (as mentioned above), which really kills performance.tags/v0.9.4
|
|
||
88 |
|
88 |
|
89 |
|
89 |
|
90 |
|
90 |
|
91 |
|
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
92 |
|
99 |
|
93 |
|
|
|
94 |
|
100 |
|
95 |
|
101 |
|
96 |
|
102 |
|
|
|
||
105 |
|
111 |
|
106 |
|
112 |
|
107 |
|
113 |
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
|
114 |
|
113 |
|
115 |
|
114 |
|
116 |
|