X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7bc01999f5003e51cc1d12f93647999a1a143f23..f9df6a0ce7023e4e22d83bb6c50f27bd21fab329:/src/simix/smx_global.cpp diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index a995c4502c..3c94c9dd75 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -25,11 +25,11 @@ #include "src/mc/mc_replay.h" #include "simgrid/sg_config.h" -#include "src/simix/SynchroExec.hpp" -#include "src/simix/SynchroComm.hpp" -#include "src/simix/SynchroSleep.hpp" -#include "src/simix/SynchroIo.hpp" -#include "src/simix/SynchroRaw.hpp" +#include "src/kernel/activity/SynchroExec.hpp" +#include "src/kernel/activity/SynchroComm.hpp" +#include "src/kernel/activity/SynchroSleep.hpp" +#include "src/kernel/activity/SynchroIo.hpp" +#include "src/kernel/activity/SynchroRaw.hpp" #if HAVE_MC #include "src/mc/mc_private.h" @@ -118,7 +118,7 @@ char sigsegv_stack[SIGSTKSZ]; /* alternate stack for SIGSEGV handler */ * Install signal handler for SIGSEGV. Check that nobody has already installed * its own handler. For example, the Java VM does this. */ -static void install_segvhandler(void) +static void install_segvhandler() { stack_t stack, old_stack; stack.ss_sp = sigsegv_stack; @@ -155,7 +155,7 @@ static void install_segvhandler(void) #endif /* _WIN32 */ /********************************* SIMIX **************************************/ -double SIMIX_timer_next(void) +double SIMIX_timer_next() { return xbt_heap_size(simix_timers) > 0 ? xbt_heap_maxkey(simix_timers) : -1.0; } @@ -201,7 +201,7 @@ void SIMIX_global_init(int *argc, char **argv) if (!simix_global) { simix_global = std::unique_ptr(new simgrid::simix::Global()); - simgrid::simix::Process proc; + simgrid::simix::ActorImpl proc; simix_global->process_to_run = xbt_dynar_new(sizeof(smx_process_t), nullptr); simix_global->process_that_ran = xbt_dynar_new(sizeof(smx_process_t), nullptr); simix_global->process_list = xbt_swag_new(xbt_swag_offset(proc, process_hookup)); @@ -263,7 +263,7 @@ int smx_cleaned = 0; * * This functions remove the memory used by SIMIX */ -void SIMIX_clean(void) +void SIMIX_clean() { if (smx_cleaned) return; // to avoid double cleaning by java and C @@ -327,7 +327,7 @@ void SIMIX_clean(void) * * \return Return the clock. */ -double SIMIX_get_clock(void) +double SIMIX_get_clock() { if(MC_is_active() || MC_record_replay_is_active()){ return MC_process_clock_get(SIMIX_process_self()); @@ -423,7 +423,7 @@ static bool SIMIX_execute_tasks() * \ingroup SIMIX_API * \brief Run the main simulation loop. */ -void SIMIX_run(void) +void SIMIX_run() { if (MC_record_path) { simgrid::mc::replay(MC_record_path); @@ -639,7 +639,7 @@ void SIMIX_function_register_process_cleanup(void_pfn_smxprocess_t } -void SIMIX_display_process_status(void) +void SIMIX_display_process_status() { if (simix_global->process_list == nullptr) { return; @@ -658,19 +658,19 @@ void SIMIX_display_process_status(void) const char* synchro_description = "unknown"; - if (dynamic_cast(process->waiting_synchro) != nullptr) + if (dynamic_cast(process->waiting_synchro) != nullptr) synchro_description = "execution"; - if (dynamic_cast(process->waiting_synchro) != nullptr) + if (dynamic_cast(process->waiting_synchro) != nullptr) synchro_description = "communication"; - if (dynamic_cast(process->waiting_synchro) != nullptr) + if (dynamic_cast(process->waiting_synchro) != nullptr) synchro_description = "sleeping"; - if (dynamic_cast(process->waiting_synchro) != nullptr) + if (dynamic_cast(process->waiting_synchro) != nullptr) synchro_description = "synchronization"; - if (dynamic_cast(process->waiting_synchro) != nullptr) + if (dynamic_cast(process->waiting_synchro) != nullptr) synchro_description = "I/O";