5 bool Promise::increment_threads(thread_id_t tid) {
6 unsigned int id=id_to_int(tid);
7 if ( id >= synced_thread.size() ) {
8 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() {
25 unsigned int sync_size=synced_thread.size();
26 for(unsigned int i=1;i<model->get_num_threads();i++) {
27 if ((i >= sync_size || !synced_thread[i]) && model->is_enabled(int_to_id(i))) {