earliest_diverge = prevnode->get_action();
}
}
- /* Start the round robin scheduler from this thread id */
- scheduler->set_scheduler_thread(tid);
/* The correct sleep set is in the parent node. */
execute_sleep_set();
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);
+ Thread *th = new Thread(thrd, params->func, params->arg, get_thread(curr));
add_thread(th);
th->set_creation(curr);
/* Promises can be satisfied by children */
return NULL;
}
- void Scheduler::set_scheduler_thread(thread_id_t tid) {
- curr_thread_index=id_to_int(tid);
- }
-
/**
* @brief Set the current "running" Thread
* @param t Thread to run
{
ASSERT(t && !t->is_model_thread());
- curr_thread_index = id_to_int(t->get_id());
+ //curr_thread_index = id_to_int(t->get_id());
current = t;
if (DBG_ENABLED())