Exemple #1
0
/** Halt wrapper
 *
 * Set halt flag and halt the CPU.
 *
 */
void halt()
{
#if (defined(CONFIG_DEBUG)) && (defined(CONFIG_KCONSOLE))
	bool rundebugger = false;
	
	if (!atomic_get(&haltstate)) {
		atomic_set(&haltstate, 1);
		rundebugger = true;
	}
#else
	atomic_set(&haltstate, 1);
#endif
	
	interrupts_disable();
	
#if (defined(CONFIG_DEBUG)) && (defined(CONFIG_KCONSOLE))
	if ((rundebugger) && (kconsole_check_poll()))
		kconsole("panic", "\nLast resort kernel console ready.\n", false);
#endif
	
	if (CPU)
		printf("cpu%u: halted\n", CPU->id);
	else
		printf("cpu: halted\n");
	
	cpu_halt();
}
Exemple #2
0
/* recv_wait() - blocking receive */
void *recv_wait()
{
    kconsole("recv_wait() called.");
    return NULL;
}