5 bool Promise::increment_threads(thread_id_t tid)
7 unsigned int id = id_to_int(tid);
8 if (id >= synced_thread.size())
9 synced_thread.resize(id + 1, false);
10 if (synced_thread[id])
13 synced_thread[id] = true;
14 unsigned int sync_size = synced_thread.size();
15 int promise_tid = id_to_int(read->get_tid());
16 for (unsigned int i = 1; i < model->get_num_threads(); i++) {
17 if ((i >= sync_size || !synced_thread[i]) && ((int)i != promise_tid) && model->is_enabled(int_to_id(i))) {
24 bool Promise::check_promise() const
26 unsigned int sync_size = synced_thread.size();
27 for (unsigned int i = 1; i < model->get_num_threads(); i++) {
28 if ((i >= sync_size || !synced_thread[i]) && model->is_enabled(int_to_id(i))) {