core: Fix 'NoHalt'
authorMatt Fleming <matt.fleming@intel.com>
Wed, 5 Dec 2012 09:20:38 +0000 (09:20 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Wed, 5 Dec 2012 21:18:18 +0000 (21:18 +0000)
Use the same variable in idle.c and ldlinux.c32.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/elflink/ldlinux/readconfig.c
core/idle.c
core/idle.inc

index 705ffa8..7411fca 100644 (file)
@@ -80,7 +80,7 @@ short includelevel = 1;               //nesting level
 short defaultlevel = 0;                //the current level of default
 short vkernel = 0;             //have we seen any "label" statements?
 short displaycon = 1;          //conio.inc
-short nohalt = 1;              //idle.inc
+extern short NoHalt;           //idle.c
 
 const char *default_cmd = NULL;        //"default" command line
 const char *onerror = NULL;    //"onerror" command line
@@ -1181,7 +1181,7 @@ do_include:
        } else if (looking_at(p, "nocomplete")) {
                nocomplete = atoi(skipspace(p + 10));
        } else if (looking_at(p, "nohalt")) {
-               nohalt = atoi(skipspace(p + 8));
+               NoHalt = atoi(skipspace(p + 8));
        } else if (looking_at(p, "onerror")) {
                refstr_put(m->onerror);
                m->onerror = refstrdup(skipspace(p + 7));
index 3f57393..137e0ea 100644 (file)
@@ -25,7 +25,7 @@
 #define TICKS_TO_IDLE  4       /* Also in idle.inc */
 
 extern uint32_t _IdleTimer;
-extern uint16_t NoHalt;
+uint16_t NoHalt = 0;
 
 int (*idle_hook_func)(void);
 
index c93d177..09a3771 100644 (file)
@@ -74,8 +74,6 @@ do_idle:
                alignz 4
                global _IdleTimer
 _IdleTimer     dd 0
-               global NoHalt
-NoHalt         dw 0
 
 hlt_err                db 'ERROR: idle with IF=0', CR, LF, 0