Use ao_delay to sleep for 2 seconds instead of trying ao_sleep
authorKeith Packard <keithp@keithp.com>
Wed, 5 May 2010 08:32:46 +0000 (01:32 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 5 May 2010 08:33:25 +0000 (01:33 -0700)
ao_sleep doesn't delay for a specified time interval as much as one
might want it to.

src/ao_cmd.c
src/ao_reboot.c

index b6d2b886e766be90fd2cf4054a51b1c158208bb0..4a68fba49d56110b252a2896bc8041478c111171 100644 (file)
@@ -208,7 +208,7 @@ ao_reboot(void)
        if (!ao_match_word("eboot"))
                return;
        WDCTL = WDCTL_EN | WDCTL_MODE_WATCHDOG | WDCTL_INT_64;
-       ao_sleep(AO_SEC_TO_TICKS(2));
+       ao_delay(AO_SEC_TO_TICKS(2));
        ao_panic(AO_PANIC_REBOOT);
 }
 
index 82ea32e0b216ba5d91084b89d02c0d1f6d2ebcf9..8c47b89351cf7ed5ce5963510dcf4227f7135606 100644 (file)
@@ -23,6 +23,6 @@ void
 ao_reboot(void)
 {
        WDCTL = WDCTL_EN | WDCTL_MODE_WATCHDOG | WDCTL_INT_32768;
-       ao_sleep(AO_SEC_TO_TICKS(2));
+       ao_delay(AO_SEC_TO_TICKS(2));
        ao_panic(AO_PANIC_REBOOT);
 }