summaryrefslogtreecommitdiffstats
path: root/src/core/timer.c
diff options
context:
space:
mode:
authorMichael Brown2008-06-11 13:06:10 +0200
committerMichael Brown2008-06-11 13:06:10 +0200
commit50810955e97cf704548c84d38194f8ef0a45d8d4 (patch)
treeefd581e4349201acbff396b95775b7c034ac6306 /src/core/timer.c
parent[slam] Implement SLAM flow control (diff)
downloadipxe-50810955e97cf704548c84d38194f8ef0a45d8d4.tar.gz
ipxe-50810955e97cf704548c84d38194f8ef0a45d8d4.tar.xz
ipxe-50810955e97cf704548c84d38194f8ef0a45d8d4.zip
[console] Call cpu_nap() only if there is no input waiting
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.
Diffstat (limited to 'src/core/timer.c')
0 files changed, 0 insertions, 0 deletions