diff options
author | hpa <hpa> | 2005-08-19 03:08:45 +0000 |
---|---|---|
committer | hpa <hpa> | 2005-08-19 03:08:45 +0000 |
commit | 9cbd0df60a1efb5e2622a54f40de557133346246 (patch) | |
tree | 831519c8cceb056f59ac8c56d46b13279e29bf9c | |
parent | 05bd717cda9192f2cac135ff3463a772a7a1c82d (diff) | |
download | syslinux-9cbd0df60a1efb5e2622a54f40de557133346246.tar.gz |
Saner idle call semantics
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | com32/lib/sys/idle.c | 3 | ||||
-rw-r--r-- | comboot.doc | 11 | ||||
-rw-r--r-- | comboot.inc | 8 | ||||
-rw-r--r-- | pxelinux.asm | 2 |
5 files changed, 21 insertions, 6 deletions
@@ -16,6 +16,9 @@ Changes in 3.10: * Comments are now recognized even without a space following #. * Fix incorrect handling of mixes of entries with and without MENU PASSWD. + * The idle API call now harmlessly returns failure if it is a + no-op. That way the caller can decide whether or not to + bother invoking it again. Changes in 3.09: * gcc4 compilation fix. diff --git a/com32/lib/sys/idle.c b/com32/lib/sys/idle.c index df8cc4af..85e857fc 100644 --- a/com32/lib/sys/idle.c +++ b/com32/lib/sys/idle.c @@ -51,8 +51,7 @@ void syslinux_idle(void) if ( do_idle ) { __intcall(0x22, &sys_idle, &idle_result); - if ( idle_result.eflags.l & EFLAGS_CF ) - do_idle = 0; + do_idle = ~idle_result.eflags.l & EFLAGS_CF; } cpu_relax(); diff --git a/comboot.doc b/comboot.doc index 8680b711..ec521add 100644 --- a/comboot.doc +++ b/comboot.doc @@ -586,10 +586,13 @@ AX=0013h [3.08] Idle loop call the moment, this is a no-op on all derivatives except PXELINUX, where it executes PXE calls to answer ARP queries. - Note: it's safe to call this API call on previous SYSLINUX - versions (2.00 or later); it will just harmlessly fail. If - API call INT 22h, AX=0015h, bit 1 is set, there is no reason - (but safe) to call this routine. + Starting with version 3.10, this API call harmlessly returns + failure (CF=1) if invoked on a platform which does not need + idle calls. Additionally, it's safe to call this API call on + previous SYSLINUX versions (2.00 or later); it will just + harmlessly fail. Thus, if this call returns failure (CF=1), + it means that there is no technical reason to call this + function again, although doing so is of course safe. AX=0014h [3.10] Local boot [PXELINUX, ISOLINUX] diff --git a/comboot.inc b/comboot.inc index a0651928..90d9e4b1 100644 --- a/comboot.inc +++ b/comboot.inc @@ -647,11 +647,19 @@ comapi_shuffle: ; ; INT 22h AX=0013h Idle call ; +%ifdef HAVE_IDLE + comapi_idle: DO_IDLE clc ret +%else + +comapi_idle equ comapi_err + +%endif + ; ; INT 22h AX=0014h Local boot ; diff --git a/pxelinux.asm b/pxelinux.asm index 13bb79b9..a83afd0a 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -60,6 +60,8 @@ SECTOR_SIZE equ TFTP_BLOCKSIZE ; ; This is what we need to do when idle ; +%define HAVE_IDLE 1 ; idle is not a noop + %macro RESET_IDLE 0 call reset_idle %endmacro |