/* This is how the idle thread halts the CPU and gets halted until the HW models raise a new interrupt; and how the HW models awake the CPU, and wait for it to complete and go to idle.  */
void posix_change_cpu_state_and_wait(bool halted)
/* This is how the idle thread halts the CPU and gets halted until the HW models raise a new interrupt; and how the HW models awake the CPU, and wait for it to complete and go to idle.  */
void posix_change_cpu_state_and_wait(bool halted)
{
	if (halted) {
		nce_halt_cpu(nce_st);
	} else {
		nce_wake_cpu(nce_st);
	}
}