/* Initialize an instance of the native simulator CPU emulator and return a pointer to it. That pointer should be passed to all subsequent calls to this module.  */
void* nce_init(void)
/* Initialize an instance of the native simulator CPU emulator and return a pointer to it. That pointer should be passed to all subsequent calls to this module.  */
void* nce_init(void)
{
	struct nce_status_t *this;
	this = calloc(1, sizeof(struct nce_status_t));
	if (this == NULL) {
		nsi_print_error_and_exit(NO_MEM_ERR);
	}
	this->cpu_halted = true;
	this->terminate = false;
	NSI_SAFE_CALL(pthread_cond_init(&this->cond_cpu, NULL));
	NSI_SAFE_CALL(pthread_mutex_init(&this->mtx_cpu, NULL));
	return (void *)this;
}