/* * Copyright 2017, Data61 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) * ABN 41 687 119 230. * * This software may be distributed and modified according to the terms of * the GNU General Public License version 2. Note that NO WARRANTY is provided. * See "LICENSE_GPLv2.txt" for details. * * @TAG(DATA61_GPL) */ #include #include void idle_thread(void) { while (1) { asm volatile("hlt"); } } /** DONT_TRANSLATE */ void VISIBLE halt(void) { /* halt is actually, idle thread without the interrupts */ asm volatile("cli"); #ifdef CONFIG_PRINTING printf("halting..."); #ifdef CONFIG_DEBUG_BUILD debug_printKernelEntryReason(); #endif #endif idle_thread(); UNREACHABLE(); }