#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
-#include "../kernel/activity/IoImpl.hpp"
#include "simgrid/sg_config.hpp"
-#include "smx_private.hpp"
+#include "src/kernel/activity/ExecImpl.hpp"
+#include "src/kernel/activity/IoImpl.hpp"
+#include "src/kernel/activity/MailboxImpl.hpp"
#include "src/kernel/activity/SleepImpl.hpp"
#include "src/kernel/activity/SynchroRaw.hpp"
#include "src/mc/mc_record.hpp"
#include "src/mc/mc_replay.hpp"
#include "src/simix/smx_host_private.hpp"
+#include "src/simix/smx_private.hpp"
#include "src/smpi/include/smpi_process.hpp"
#include "src/surf/StorageImpl.hpp"
#include "src/surf/xml/platf.hpp"
#if SIMGRID_HAVE_MC
-#include "src/mc/mc_private.hpp"
#include "src/mc/remote/Client.hpp"
-#include "src/mc/remote/mc_protocol.h"
-#endif
-
-#if HAVE_SMPI
-#include "src/smpi/include/private.hpp"
#endif
#include <boost/heap/fibonacci_heap.hpp>
-#include <csignal>
XBT_LOG_NEW_CATEGORY(simix, "All SIMIX categories");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_kernel, simix, "Logging specific to SIMIX (kernel)");
}
}
-static std::function<void()> maestro_code;
+static simgrid::simix::ActorCode maestro_code;
void SIMIX_set_maestro(void (*code)(void*), void* data)
{
#ifdef _WIN32
/* register a function to be called by SURF after the environment creation */
sg_platf_init();
simgrid::s4u::on_platform_created.connect(SIMIX_post_create_environment);
- simgrid::s4u::Host::on_creation.connect([](simgrid::s4u::Host& host) {
- if (host.extension<simgrid::simix::Host>() == nullptr) // another callback to the same signal may have created it
- host.extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
- });
simgrid::s4u::Storage::on_creation.connect([](simgrid::s4u::Storage& storage) {
sg_storage_t s = simgrid::s4u::Storage::by_name(storage.get_cname());
#endif
/* Let's free maestro now */
- delete simix_global->maestro_process->context;
- simix_global->maestro_process->context = nullptr;
+ delete simix_global->maestro_process->context_;
+ simix_global->maestro_process->context_ = nullptr;
delete simix_global->maestro_process;
simix_global->maestro_process = nullptr;
do {
XBT_DEBUG("New Schedule Round; size(queue)=%zu", simix_global->process_to_run.size());
- if (simgrid::simix::breakpoint >= 0.0 && time >= simgrid::simix::breakpoint) {
+ if (simgrid::simix::breakpoint >= 0.0 && surf_get_clock() >= simgrid::simix::breakpoint) {
XBT_DEBUG("Breakpoint reached (%g)", simgrid::simix::breakpoint.get());
simgrid::simix::breakpoint = -1.0;
#ifdef SIGTRAP
if (boost::dynamic_pointer_cast<simgrid::kernel::activity::IoImpl>(process->waiting_synchro) != nullptr)
synchro_description = "I/O";
- XBT_INFO("Process %ld (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid,
- process->get_cname(), process->host->get_cname(), synchro_description, process->waiting_synchro.get(),
+ XBT_INFO("Process %ld (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid_,
+ process->get_cname(), process->host_->get_cname(), synchro_description, process->waiting_synchro.get(),
process->waiting_synchro->name_.c_str(), (int)process->waiting_synchro->state_);
}
else {
- XBT_INFO("Process %ld (%s@%s)", process->pid, process->get_cname(), process->host->get_cname());
+ XBT_INFO("Process %ld (%s@%s)", process->pid_, process->get_cname(), process->host_->get_cname());
}
}
}