fix edge case
[c11tester.git] / history.cc
index e4394a5d68fae99b935d1cdf648281c3956bea1f..c15bb26fff72241bde7bd64ea0dcb87fcac091c7 100644 (file)
@@ -190,7 +190,7 @@ void ModelHistory::process_action(ModelAction *act, thread_id_t tid)
                func_node->update_inst_act_map(tid, act);
 
                Fuzzer * fuzzer = model->get_execution()->getFuzzer();
-               Predicate * selected_branch = fuzzer->get_selected_child_branch(tid);
+               Predicate * selected_branch = ((NewFuzzer *)fuzzer)->get_selected_child_branch(tid);
                func_node->set_predicate_tree_position(tid, selected_branch);
        }
 
@@ -363,7 +363,7 @@ void ModelHistory::check_waiting_write(ModelAction * write_act)
                        Thread * thread = model->get_thread(tid);
 
                        //model_print("** thread %d is woken up\n", thread->get_id());
-                       model->get_execution()->getFuzzer()->notify_paused_thread(thread);
+                       ((NewFuzzer *)model->get_execution()->getFuzzer())->notify_paused_thread(thread);
                }
 
                index++;
@@ -385,7 +385,7 @@ WaitObj * ModelHistory::getWaitObj(thread_id_t tid)
 }
 
 void ModelHistory::add_waiting_thread(thread_id_t self_id,
-thread_id_t waiting_for_id, FuncNode * target_node, int dist)
+                                                                                                                                                       thread_id_t waiting_for_id, FuncNode * target_node, int dist)
 {
        WaitObj * self_wait_obj = getWaitObj(self_id);
        self_wait_obj->add_waiting_for(waiting_for_id, target_node, dist);
@@ -414,7 +414,7 @@ void ModelHistory::remove_waiting_thread(thread_id_t tid)
 }
 
 void ModelHistory::stop_waiting_for_node(thread_id_t self_id,
-thread_id_t waiting_for_id, FuncNode * target_node)
+                                                                                                                                                                thread_id_t waiting_for_id, FuncNode * target_node)
 {
        WaitObj * self_wait_obj = getWaitObj(self_id);
        bool thread_removed = self_wait_obj->remove_waiting_for_node(waiting_for_id, target_node);
@@ -431,7 +431,7 @@ thread_id_t waiting_for_id, FuncNode * target_node)
                        // model_print("\tthread %d waits for nobody, wake up\n", self_id);
                        ModelExecution * execution = model->get_execution();
                        Thread * thread = execution->get_thread(self_id);
-                       execution->getFuzzer()->notify_paused_thread(thread);
+                       ((NewFuzzer *)execution->getFuzzer())->notify_paused_thread(thread);
                }
        }
 }
@@ -533,7 +533,7 @@ void ModelHistory::monitor_waiting_thread_counter(thread_id_t tid)
                                // model_print("\tthread %d waits for nobody, wake up\n", self_id);
                                ModelExecution * execution = model->get_execution();
                                Thread * thread = execution->get_thread(waited_by_id);
-                               execution->getFuzzer()->notify_paused_thread(thread);
+                               ((NewFuzzer *)execution->getFuzzer())->notify_paused_thread(thread);
                        }
                }
        }