[syslinux:master] ifcpu.c32: remove open-coded sleep function

syslinux-bot for H. Peter Anvin hpa at zytor.com
Mon Jul 5 16:00:03 PDT 2010


Commit-ID:  275afb229201057bab9c760105ff75c3e8c108eb
Gitweb:     http://syslinux.zytor.com/commit/275afb229201057bab9c760105ff75c3e8c108eb
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Mon, 5 Jul 2010 15:58:45 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Mon, 5 Jul 2010 15:58:45 -0700

ifcpu.c32: remove open-coded sleep function

Remove open-coded sleep function, which uses an unreliable BIOS call.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 com32/modules/ifcpu.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/com32/modules/ifcpu.c b/com32/modules/ifcpu.c
index cf6282f..b455d0c 100644
--- a/com32/modules/ifcpu.c
+++ b/com32/modules/ifcpu.c
@@ -61,18 +61,6 @@ static void usage(void)
  "if you want to match many cpu features, just separate them with a single space.\n");
 }
 
-static unsigned char sleep(unsigned int msec)
-{
-    unsigned long micro = 1000 * msec;
-    com32sys_t inreg, outreg;
-
-    REG_AH(inreg) = 0x86;
-    REG_CX(inreg) = (micro >> 16);
-    REG_DX(inreg) = (micro & 0xFFFF);
-    __intcall(0x15, &inreg, &outreg);
-    return REG_AH(outreg);
-}
-
 /* XXX: this really should be librarized */
 static void boot_args(char **args)
 {
@@ -172,7 +160,7 @@ int main(int argc, char *argv[])
 	       hardware_matches ? *args[0] : *args[1]);
 	printf("Sleeping 5sec before booting\n");
 	if (!dryrun)
-	    sleep(5000);
+	    sleep(5);
     }
 
     if (!dryrun)



More information about the Syslinux-commits mailing list