{
ModelAction *prev;
Node *node;
- Thread *t = get_thread(act->get_tid());
+ Thread *t = get_thread(act);
prev = get_last_conflict(act);
if (prev == NULL)
}
case THREAD_JOIN: {
Thread *wait, *join;
- wait = get_thread(curr->get_tid());
+ wait = get_thread(curr);
join = (Thread *)curr->get_location();
if (!join->is_complete())
scheduler->wait(wait, join);
break;
}
case THREAD_FINISH: {
- Thread *th = get_thread(curr->get_tid());
+ Thread *th = get_thread(curr);
while (!th->wait_list_empty()) {
Thread *wake = th->pop_wait_list();
scheduler->wake(wake);
break;
}
- Thread *th = get_thread(curr->get_tid());
+ Thread *th = get_thread(curr);
bool updated = false;
if (curr->is_read()) {
void add_thread(Thread *t);
void remove_thread(Thread *t);
Thread * get_thread(thread_id_t tid) { return thread_map->get(id_to_int(tid)); }
+ Thread * get_thread(ModelAction *act) { return get_thread(act->get_tid()); }
thread_id_t get_next_id();
int get_num_threads();