X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39c935d6d5ee86d153f6f7e6a10d723ae7c57f6f..18bdb6eb6cd157e6f674f2621235635beb74d5c3:/src/simix/popping_generated.cpp diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index 0c4e43190d..a4f88aaf9c 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -21,6 +21,7 @@ #include "src/mc/mc_forward.hpp" #endif #include "src/kernel/activity/ConditionVariableImpl.hpp" +#include "src/mc/checker/SimcallObserver.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping); @@ -39,12 +40,10 @@ constexpr std::array simcall_names{{ "Simcall::COMM_TESTANY", "Simcall::MUTEX_LOCK", "Simcall::MUTEX_TRYLOCK", - "Simcall::MUTEX_UNLOCK", "Simcall::COND_WAIT", "Simcall::COND_WAIT_TIMEOUT", "Simcall::SEM_ACQUIRE", "Simcall::SEM_ACQUIRE_TIMEOUT", - "Simcall::MC_RANDOM", "Simcall::RUN_KERNEL", "Simcall::RUN_BLOCKING", }}; @@ -54,9 +53,12 @@ constexpr std::array simcall_names{{ * * This function is generated from src/simix/simcalls.in */ -void simgrid::kernel::actor::ActorImpl::simcall_handle(int value) { +void simgrid::kernel::actor::ActorImpl::simcall_handle(int times_considered_) +{ XBT_DEBUG("Handling simcall %p: %s", &simcall_, SIMIX_simcall_name(simcall_.call_)); - SIMCALL_SET_MC_VALUE(simcall_, value); + SIMCALL_SET_MC_VALUE(simcall_, times_considered_); + if (simcall_.observer_ != nullptr) + simcall_.observer_->prepare(times_considered_); if (context_->wannadie()) return; switch (simcall_.call_) { @@ -107,11 +109,6 @@ void simgrid::kernel::actor::ActorImpl::simcall_handle(int value) { simcall_answer(); break; - case Simcall::MUTEX_UNLOCK: - simcall_HANDLER_mutex_unlock(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0])); - simcall_answer(); - break; - case Simcall::COND_WAIT: simcall_HANDLER_cond_wait(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1])); break; @@ -128,11 +125,6 @@ void simgrid::kernel::actor::ActorImpl::simcall_handle(int value) { simcall_HANDLER_sem_acquire_timeout(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1])); break; - case Simcall::MC_RANDOM: - simgrid::simix::marshal(simcall_.result_, simcall_HANDLER_mc_random(&simcall_, simgrid::simix::unmarshal(simcall_.args_[0]), simgrid::simix::unmarshal(simcall_.args_[1]))); - simcall_answer(); - break; - case Simcall::RUN_KERNEL: SIMIX_run_kernel(simgrid::simix::unmarshal const*>(simcall_.args_[0])); simcall_answer();