Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4345 → Rev 4346

/branches/dynload/kernel/generic/src/lib/func.c
47,7 → 47,7
 
/** Halt wrapper
*
* Set halt flag and halt the cpu.
* Set halt flag and halt the CPU.
*
*/
void halt()
54,7 → 54,7
{
#ifdef CONFIG_DEBUG
bool rundebugger = false;
 
if (!atomic_get(&haltstate)) {
atomic_set(&haltstate, 1);
rundebugger = true;
62,12 → 62,12
#else
atomic_set(&haltstate, 1);
#endif
 
interrupts_disable();
#if (defined(CONFIG_DEBUG)) && (defined(CONFIG_KCONSOLE))
if (rundebugger)
kconsole("panic", "\nLast resort kernel console ready\n", false);
if ((rundebugger) && (kconsole_check_poll()))
kconsole("panic", "\nLast resort kernel console ready.\n", false);
#endif
if (CPU)
74,6 → 74,7
printf("cpu%u: halted\n", CPU->id);
else
printf("cpu: halted\n");
cpu_halt();
}