/* Initialize a model-checker thread, for special ModelActions */
model_thread = new Thread(get_next_id());
thread_map->put(id_to_int(model_thread->get_id()), model_thread);
+ scheduler->register_engine(this);
}
/** @brief Destructor */
case READ_FROM_FUTURE: {
/* Read from future value */
struct future_value fv = node->get_future_value();
- Promise *promise = new Promise(curr, fv);
+ Promise *promise = new Promise(this, curr, fv);
curr->set_read_from_promise(promise);
promises->push_back(promise);
mo_graph->startChanges();
case THREAD_CREATE: {
thrd_t *thrd = (thrd_t *)curr->get_location();
struct thread_params *params = (struct thread_params *)curr->get_value();
- Thread *th = new Thread(thrd, params->func, params->arg, get_thread(curr));
+ Thread *th = new Thread(get_next_id(), thrd, params->func, params->arg, get_thread(curr));
add_thread(th);
th->set_creation(curr);
/* Promises can be satisfied by children */