Since I need a ModelChecker::add_thread(Thread *) function anyway, I should
direct add_thread() calls through the model-checker framework rather than the
Scheduler class. This will make things a little cleaner and symmetric when I
add a remove_thread() function.
int ModelChecker::add_thread(Thread *t)
{
thread_map[t->get_id()] = t;
+ scheduler->add_thread(t);
return 0;
}
state = THREAD_CREATED;
id = model->get_next_id();
*user_thread = id;
- model->scheduler->add_thread(this);
}
Thread::Thread(thrd_t *t) {