X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=newfuzzer.cc;h=7d4e8b1810880f600393e76f5618af8dc2b9516b;hp=fca9da8d48896504b6aafeea2dda40060a10e1a8;hb=251ac4b4bf3a9f2d3cfacc1e6618200ca1c431ac;hpb=884ebb4495edcb6fed84c0b4746b882bb0918ddc diff --git a/newfuzzer.cc b/newfuzzer.cc index fca9da8d..7d4e8b18 100644 --- a/newfuzzer.cc +++ b/newfuzzer.cc @@ -310,27 +310,27 @@ bool NewFuzzer::prune_writes(thread_id_t tid, Predicate * pred, SnapVectorgetScheduler()->add_sleep(thread); - paused_thread_list.push_back(thread); - paused_thread_table.put(thread, index); // Update table + model->getScheduler()->add_sleep(thread); + paused_thread_list.push_back(thread); + paused_thread_table.put(thread, index); // Update table - // Add the waiting condition to ModelHistory - ModelAction * read = thread->get_pending(); - thread_id_t tid = thread->get_id(); - FuncNode * func_node = history->get_curr_func_node(tid); -// inst_act_map_t * inst_act_map = func_node->get_inst_act_map(tid); + // Add the waiting condition to ModelHistory + ModelAction * read = thread->get_pending(); + thread_id_t tid = thread->get_id(); + FuncNode * func_node = history->get_curr_func_node(tid); + // inst_act_map_t * inst_act_map = func_node->get_inst_act_map(tid); - Predicate * selected_branch = get_selected_child_branch(tid); -// ConcretePredicate * concrete = selected_branch->evaluate(inst_act_map, tid); - concrete->set_location(read->get_location()); + Predicate * selected_branch = get_selected_child_branch(tid); + // ConcretePredicate * concrete = selected_branch->evaluate(inst_act_map, tid); + concrete->set_location(read->get_location()); - ASSERT(false); + ASSERT(false); -// history->add_waiting_write(concrete); - // history->add_waiting_thread is already called in find_threads -*/ + // history->add_waiting_write(concrete); + // history->add_waiting_thread is already called in find_threads + */ } bool NewFuzzer::has_paused_threads() @@ -447,5 +447,5 @@ bool NewFuzzer::find_threads(ModelAction * pending_read) bool NewFuzzer::shouldWait(const ModelAction * act) { - return random() & 1; + return true; }