[syslinux:master] core: remove do_idle from pollchar
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Tue Mar 30 15:18:02 PDT 2010
Commit-ID: 1672d1fcf1c261e92c0a8beb4b36c190c9b2d062
Gitweb: http://syslinux.zytor.com/commit/1672d1fcf1c261e92c0a8beb4b36c190c9b2d062
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Tue, 30 Mar 2010 15:13:58 -0700
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Tue, 30 Mar 2010 15:13:58 -0700
core: remove do_idle from pollchar
Remove do_idle from pollchar; it is highly inappropriate while, for
example, checking for a keypress during disk activity. Furthermore,
make sure we reset the idle counter on events that indicate actual
disk activity.
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
core/comboot.inc | 5 +++++
core/conio.inc | 1 -
core/pxelinux.asm | 1 +
core/ui.inc | 1 +
4 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/core/comboot.inc b/core/comboot.inc
index 6cf051e..f8a7853 100644
--- a/core/comboot.inc
+++ b/core/comboot.inc
@@ -507,6 +507,7 @@ comapi_textmode:
; INT 22h AX=0006h Open file
;
comapi_open:
+ call reset_idle
push ds
mov ds,P_ES
mov si,P_SI
@@ -525,6 +526,7 @@ comapi_open:
; INT 22h AX=0007h Read file
;
comapi_read:
+ call reset_idle
mov es,P_ES
mov bx,P_BX
mov si,P_SI
@@ -829,6 +831,7 @@ comapi_userfont:
;
%if IS_SYSLINUX || IS_ISOLINUX || IS_EXTLINUX
comapi_readdisk:
+ call reset_idle
mov esi,P_ESI ; Enforce ESI == EDI == 0, these
or esi,P_EDI ; are reserved for future expansion
jnz .err
@@ -896,6 +899,7 @@ comapi_getcwd:
;
%if IS_SYSLINUX
comapi_opendir:
+ call reset_idle
push ds
mov ds,P_ES
mov si,P_SI
@@ -922,6 +926,7 @@ comapi_opendir equ comapi_err
;
%if IS_SYSLINUX
comapi_readdir:
+ call reset_idle
mov es,P_ES
mov di,P_DI
mov si,P_SI
diff --git a/core/conio.inc b/core/conio.inc
index 16c39c6..701fcf0 100644
--- a/core/conio.inc
+++ b/core/conio.inc
@@ -286,7 +286,6 @@ write_serial_str:
; pollchar: check if we have an input character pending (ZF = 0)
;
pollchar:
- call do_idle
pushad
mov ah,11h ; Poll keyboard
int 16h
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
index 55444db..edb1584 100644
--- a/core/pxelinux.asm
+++ b/core/pxelinux.asm
@@ -956,6 +956,7 @@ kaboom:
.wait2: mov dx,[BIOS_timer]
.wait3: call pollchar
jnz .keypress
+ call do_idle
cmp dx,[BIOS_timer]
je .wait3
loop .wait2,ecx
diff --git a/core/ui.inc b/core/ui.inc
index 348527a..ed96ccd 100644
--- a/core/ui.inc
+++ b/core/ui.inc
@@ -544,6 +544,7 @@ getchar_timeout:
push word [BIOS_timer]
call pollchar
jnz .got_char
+ call do_idle
pop ax
cmp ax,[BIOS_timer] ; Has the timer advanced?
je .loop
More information about the Syslinux-commits
mailing list