21 #ifndef RECONF_THREADS_H
22 #define RECONF_THREADS_H
30 sc_process_handle p_handle;
33 wait(reconf_interface.configuration_updated());
35 if(p_handle.valid()) {
37 #ifdef GENERATE_LOG_FILE
38 Simulation_controller::get_logfile() << reconf_interface.get_name() <<
": Waiting for the end of previous user algorithm..." << endl;
40 if(!p_handle.terminated()) wait(p_handle.terminated_event());
41 #ifdef GENERATE_LOG_FILE
42 Simulation_controller::get_logfile() << reconf_interface.get_name() <<
": Previous user algorithm terminated successfully!" << endl;
46 void *user_interface_ptr = &user_algo_interface;
48 #ifdef GENERATE_LOG_FILE
49 Simulation_controller::get_logfile() << reconf_interface.get_name() <<
": Configuration update: Algorithm " << reconf_interface.get_current_implementation_id()
50 <<
" (" << reconf_interface.get_implementation_vector().at(reconf_interface.get_current_implementation_id()).get_name() <<
")" << endl;
52 p_handle = sc_spawn(sc_bind(reconf_interface.get_implementation_vector().at(reconf_interface.get_current_implementation_id()).get_algorithm_thread_ptr(), user_interface_ptr));
54 reconf_interface.finish_configuration();
Definition: reconf_thread_interface.h:28
Definition: user_algorithm_interface.h:35