From 652e6c763d01ad7924087d541928bd44c795d72d Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 7 Jun 2017 11:17:05 +0200 Subject: [PATCH] further WIP on the ActivityImplPtr feature. Now it compiles (but fails) ActivityImplPtr are all over the place, and the manual refcounting is dead. Most tests still fail, for some reason that I don't understand yet. That's a WIP... Notable point: MC wants to retrieve the pointers to the ActivityImpl in a remote process, even if their type is ActivityImplPtr (that is, intrusive_ptr). The good thing is that in this case, the raw pointer is stored in the simcall parameters, and the *Ptr type is reconstructed by the marshal function. So I just have to generate the __getraw__() functions that return the raw pointer without building a *Ptr type. It compiles, but the MC is broken ATM so maybe it's not sufficient. I'm committing anyway because I want to add simpler tests for the communications that would make the debug of this feature easier to achieve. --- src/kernel/activity/ActivityImpl.cpp | 11 +- src/kernel/activity/CommImpl.cpp | 1 - src/kernel/activity/MailboxImpl.cpp | 6 +- .../CommunicationDeterminismChecker.cpp | 4 +- src/mc/mc_comm_pattern.cpp | 4 +- src/mc/mc_request.cpp | 27 +- src/mc/mc_state.cpp | 21 +- src/msg/msg_gos.cpp | 5 - src/s4u/s4u_comm.cpp | 8 - src/simix/ActorImpl.hpp | 3 +- src/simix/popping_accessors.h | 843 ++++++++++++++++-- src/simix/popping_bodies.cpp | 98 +- src/simix/popping_generated.cpp | 122 ++- src/simix/popping_private.h | 54 +- src/simix/simcalls.in | 26 +- src/simix/simcalls.py | 12 + src/simix/smx_network.cpp | 35 +- 17 files changed, 1057 insertions(+), 223 deletions(-) diff --git a/src/kernel/activity/ActivityImpl.cpp b/src/kernel/activity/ActivityImpl.cpp index c732b28eea..02733ec904 100644 --- a/src/kernel/activity/ActivityImpl.cpp +++ b/src/kernel/activity/ActivityImpl.cpp @@ -5,6 +5,8 @@ #include "src/kernel/activity/ActivityImpl.hpp" +XBT_LOG_EXTERNAL_CATEGORY(simix_network); + namespace simgrid { namespace kernel { namespace activity { @@ -14,17 +16,22 @@ ActivityImpl::~ActivityImpl() = default; void ActivityImpl::ref() { - // Atomic operation! Do not split in two instructions! xbt_assert(refcount_ != 0); refcount_++; + XBT_CDEBUG(simix_network, "%p->refcount++ ~> %d", this, (int)refcount_); + if (XBT_LOG_ISENABLED(simix_network, xbt_log_priority_trace)) + xbt_backtrace_display_current(); } void ActivityImpl::unref() { + XBT_CDEBUG(simix_network, "%p->refcount-- ~> %d", this, ((int)refcount_) - 1); xbt_assert(refcount_ > 0, "This activity has a negative refcount! You can only call test() or wait() once per activity."); refcount_--; - if (refcount_ == 0) + if (XBT_LOG_ISENABLED(simix_network, xbt_log_priority_trace)) + xbt_backtrace_display_current(); + if (refcount_ <= 0) delete this; } diff --git a/src/kernel/activity/CommImpl.cpp b/src/kernel/activity/CommImpl.cpp index 85ccbea5c1..db13aca6f5 100644 --- a/src/kernel/activity/CommImpl.cpp +++ b/src/kernel/activity/CommImpl.cpp @@ -17,7 +17,6 @@ simgrid::kernel::activity::CommImpl::CommImpl(e_smx_comm_type_t _type) : type(_t state = SIMIX_WAITING; src_data = nullptr; dst_data = nullptr; - intrusive_ptr_add_ref(this); XBT_DEBUG("Create comm activity %p", this); } diff --git a/src/kernel/activity/MailboxImpl.cpp b/src/kernel/activity/MailboxImpl.cpp index 9c7ef0404f..81324ccaac 100644 --- a/src/kernel/activity/MailboxImpl.cpp +++ b/src/kernel/activity/MailboxImpl.cpp @@ -55,8 +55,8 @@ void MailboxImpl::setReceiver(s4u::ActorPtr actor) */ void MailboxImpl::push(activity::CommImplPtr comm) { - this->comm_queue.push_back(comm); comm->mbox = this; + this->comm_queue.push_back(std::move(comm)); } /** @brief Removes a communication activity from a mailbox @@ -67,13 +67,15 @@ void MailboxImpl::remove(smx_activity_t activity) simgrid::kernel::activity::CommImplPtr comm = boost::static_pointer_cast(activity); + xbt_assert(comm->mbox == this, "Comm %p is in mailbox %s, not mailbox %s", comm, + (comm->mbox ? comm->mbox->name_ : "(null)"), this->name_); comm->mbox = nullptr; for (auto it = this->comm_queue.begin(); it != this->comm_queue.end(); it++) if (*it == comm) { this->comm_queue.erase(it); return; } - xbt_die("Cannot remove the comm %p that is not part of the mailbox %s", comm, this->name_); + xbt_die("Comm %p not found in mailbox %s", comm, this->name_); } } } diff --git a/src/mc/checker/CommunicationDeterminismChecker.cpp b/src/mc/checker/CommunicationDeterminismChecker.cpp index bd712ee457..cb723fb60e 100644 --- a/src/mc/checker/CommunicationDeterminismChecker.cpp +++ b/src/mc/checker/CommunicationDeterminismChecker.cpp @@ -185,7 +185,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim if (call_type == MC_CALL_TYPE_SEND) { /* Create comm pattern */ pattern->type = simgrid::mc::PatternCommunicationType::send; - pattern->comm_addr = &*simcall_comm_isend__get__result(request); + pattern->comm_addr = static_cast(simcall_comm_isend__getraw__result(request)); simgrid::mc::Remote temp_synchro; mc_model_checker->process().read(temp_synchro, @@ -223,7 +223,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim } } else if (call_type == MC_CALL_TYPE_RECV) { pattern->type = simgrid::mc::PatternCommunicationType::receive; - pattern->comm_addr = simcall_comm_irecv__get__result(request); + pattern->comm_addr = static_cast(simcall_comm_irecv__getraw__result(request)); simgrid::smpi::Request mpi_request; mc_model_checker->process().read(&mpi_request, diff --git a/src/mc/mc_comm_pattern.cpp b/src/mc/mc_comm_pattern.cpp index c6eede3fb3..dfba80e066 100644 --- a/src/mc/mc_comm_pattern.cpp +++ b/src/mc/mc_comm_pattern.cpp @@ -88,7 +88,9 @@ void MC_handle_comm_pattern( { simgrid::mc::RemotePtr comm_addr = nullptr; if (call_type == MC_CALL_TYPE_WAIT) - comm_addr = remote(static_cast(simcall_comm_wait__get__comm(req))); + comm_addr = remote(static_cast( + simgrid::simix::unmarshal(req->result))); + else { simgrid::kernel::activity::CommImpl* addr; // comm_addr = REMOTE(xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_synchro_t)): diff --git a/src/mc/mc_request.cpp b/src/mc/mc_request.cpp index 06e09a48d6..efa8aa7dd0 100644 --- a/src/mc/mc_request.cpp +++ b/src/mc/mc_request.cpp @@ -23,9 +23,9 @@ static inline simgrid::kernel::activity::CommImpl* MC_get_comm(smx_simcall_t r) { switch (r->call ) { case SIMCALL_COMM_WAIT: - return static_cast(simcall_comm_wait__get__comm(r)); + return static_cast(simcall_comm_wait__getraw__comm(r)); case SIMCALL_COMM_TEST: - return static_cast(simcall_comm_test__get__comm(r)); + return static_cast(simcall_comm_test__getraw__comm(r)); default: return nullptr; } @@ -257,7 +257,7 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid case SIMCALL_COMM_WAIT: { simgrid::kernel::activity::CommImpl* remote_act = - static_cast(simcall_comm_wait__get__comm(req)); + static_cast(simcall_comm_wait__getraw__comm(req)); char* p; if (value == -1) { type = "WaitTimeout"; @@ -290,7 +290,7 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid case SIMCALL_COMM_TEST: { simgrid::kernel::activity::CommImpl* remote_act = - static_cast(simcall_comm_test__get__comm(req)); + static_cast(simcall_comm_test__getraw__comm(req)); simgrid::mc::Remote temp_synchro; simgrid::kernel::activity::CommImpl* act; if (use_remote_comm) { @@ -329,7 +329,7 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid read_element(mc_model_checker->process(), &remote_sync, remote(simcall_comm_waitany__get__comms(req)), value, sizeof(remote_sync)); - char* p = pointer_to_string(remote_sync); + char* p = pointer_to_string(&*remote_sync); args = bprintf("comm=%s (%d of %lu)", p, value + 1, xbt_dynar_length(&comms)); xbt_free(p); @@ -404,25 +404,22 @@ namespace mc { bool request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx) { - smx_activity_t remote_act = nullptr; + simgrid::kernel::activity::ActivityImpl* remote_act = nullptr; switch (req->call) { case SIMCALL_COMM_WAIT: /* FIXME: check also that src and dst processes are not suspended */ - remote_act = simcall_comm_wait__get__comm(req); + remote_act = simcall_comm_wait__getraw__comm(req); break; case SIMCALL_COMM_WAITANY: { - read_element( - mc_model_checker->process(), &remote_act, - remote(simcall_comm_waitany__get__comms(req)), - idx, sizeof(remote_act)); + read_element(mc_model_checker->process(), &remote_act, remote(simcall_comm_waitany__getraw__comms(req)), idx, + sizeof(remote_act)); } break; case SIMCALL_COMM_TESTANY: - remote_act = mc_model_checker->process().read(remote( - simcall_comm_testany__get__comms(req) + idx)); + remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__getraw__comms(req) + idx)); break; default: @@ -489,7 +486,7 @@ std::string request_get_dot_output(smx_simcall_t req, int value) else label = simgrid::xbt::string_printf("[(%lu)] WaitTimeout", issuer->pid); } else { - smx_activity_t remote_act = simcall_comm_wait__get__comm(req); + simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_wait__getraw__comm(req); simgrid::mc::Remote temp_comm; mc_model_checker->process().read(temp_comm, remote(static_cast(remote_act))); @@ -511,7 +508,7 @@ std::string request_get_dot_output(smx_simcall_t req, int value) } case SIMCALL_COMM_TEST: { - smx_activity_t remote_act = simcall_comm_test__get__comm(req); + simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_test__getraw__comm(req); simgrid::mc::Remote temp_comm; mc_model_checker->process().read(temp_comm, remote(static_cast(remote_act))); simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer(); diff --git a/src/mc/mc_state.cpp b/src/mc/mc_state.cpp index e399fa2979..f606492d7b 100644 --- a/src/mc/mc_state.cpp +++ b/src/mc/mc_state.cpp @@ -130,7 +130,7 @@ static inline smx_simcall_t MC_state_get_request_for_process( case SIMCALL_COMM_WAIT: { simgrid::mc::RemotePtr remote_act = - remote(static_cast(simcall_comm_wait__get__comm(&actor->simcall))); + remote(static_cast(simcall_comm_wait__getraw__comm(&actor->simcall))); simgrid::mc::Remote temp_act; mc_model_checker->process().read(temp_act, remote_act); simgrid::kernel::activity::CommImpl* act = temp_act.getBuffer(); @@ -176,10 +176,9 @@ static inline smx_simcall_t MC_state_get_request_for_process( switch (req->call) { case SIMCALL_COMM_WAITANY: { state->internal_req.call = SIMCALL_COMM_WAIT; - smx_activity_t remote_comm; - read_element(mc_model_checker->process(), - &remote_comm, remote(simcall_comm_waitany__get__comms(req)), - state->transition.argument, sizeof(remote_comm)); + simgrid::kernel::activity::ActivityImpl* remote_comm; + read_element(mc_model_checker->process(), &remote_comm, remote(simcall_comm_waitany__getraw__comms(req)), + state->transition.argument, sizeof(remote_comm)); mc_model_checker->process().read(state->internal_comm, remote(static_cast(remote_comm))); simcall_comm_wait__set__comm(&state->internal_req, state->internal_comm.getBuffer()); @@ -191,8 +190,8 @@ static inline smx_simcall_t MC_state_get_request_for_process( state->internal_req.call = SIMCALL_COMM_TEST; if (state->transition.argument > 0) { - smx_activity_t remote_comm = mc_model_checker->process().read( - remote(simcall_comm_testany__get__comms(req) + state->transition.argument)); + simgrid::kernel::activity::ActivityImpl* remote_comm = mc_model_checker->process().read( + remote(simcall_comm_testany__getraw__comms(req) + state->transition.argument)); mc_model_checker->process().read(state->internal_comm, remote(static_cast(remote_comm))); } @@ -202,15 +201,15 @@ static inline smx_simcall_t MC_state_get_request_for_process( break; case SIMCALL_COMM_WAIT: - mc_model_checker->process().read_bytes(&state->internal_comm , - sizeof(state->internal_comm), remote(simcall_comm_wait__get__comm(req))); + mc_model_checker->process().read_bytes(&state->internal_comm, sizeof(state->internal_comm), + remote(simcall_comm_wait__getraw__comm(req))); simcall_comm_wait__set__comm(&state->executed_req, state->internal_comm.getBuffer()); simcall_comm_wait__set__comm(&state->internal_req, state->internal_comm.getBuffer()); break; case SIMCALL_COMM_TEST: - mc_model_checker->process().read_bytes(&state->internal_comm, - sizeof(state->internal_comm), remote(simcall_comm_test__get__comm(req))); + mc_model_checker->process().read_bytes(&state->internal_comm, sizeof(state->internal_comm), + remote(simcall_comm_test__getraw__comm(req))); simcall_comm_test__set__comm(&state->executed_req, state->internal_comm.getBuffer()); simcall_comm_test__set__comm(&state->internal_req, state->internal_comm.getBuffer()); break; diff --git a/src/msg/msg_gos.cpp b/src/msg/msg_gos.cpp index 27fd37dc22..f3880e3de9 100644 --- a/src/msg/msg_gos.cpp +++ b/src/msg/msg_gos.cpp @@ -491,7 +491,6 @@ int MSG_comm_test(msg_comm_t comm) if (finished && comm->task_received != nullptr) { /* I am the receiver */ (*comm->task_received)->simdata->setNotUsed(); - comm->s_comm->unref(); } } catch (xbt_ex& e) { @@ -559,7 +558,6 @@ int MSG_comm_testany(xbt_dynar_t comms) if (status == MSG_OK && comm->task_received != nullptr) { /* I am the receiver */ (*comm->task_received)->simdata->setNotUsed(); - comm->s_comm->unref(); } } @@ -588,7 +586,6 @@ msg_error_t MSG_comm_wait(msg_comm_t comm, double timeout) { try { simcall_comm_wait(comm->s_comm, timeout); - comm->s_comm->unref(); if (comm->task_received != nullptr) { /* I am the receiver */ @@ -673,7 +670,6 @@ int MSG_comm_waitany(xbt_dynar_t comms) if (comm->task_received != nullptr) { /* I am the receiver */ (*comm->task_received)->simdata->setNotUsed(); - comm->s_comm->unref(); } return finished_index; @@ -802,7 +798,6 @@ msg_error_t MSG_task_send_with_timeout(msg_task_t task, const char *alias, doubl simcall_set_category(comm, task->category); t_simdata->comm = boost::static_pointer_cast(comm); simcall_comm_wait(comm, timeout); - comm->unref(); } catch (xbt_ex& e) { switch (e.category) { diff --git a/src/s4u/s4u_comm.cpp b/src/s4u/s4u_comm.cpp index 8340bd320b..719700e0f1 100644 --- a/src/s4u/s4u_comm.cpp +++ b/src/s4u/s4u_comm.cpp @@ -23,8 +23,6 @@ Comm::~Comm() XBT_INFO("pimpl_ is null"); xbt_backtrace_display_current(); } - if (pimpl_) - pimpl_->unref(); } s4u::CommPtr Comm::send_init(s4u::MailboxPtr chan) @@ -117,8 +115,6 @@ void Comm::wait() { } } state_ = finished; - if (pimpl_) - pimpl_->unref(); } void Comm::wait(double timeout) { @@ -127,7 +123,6 @@ void Comm::wait(double timeout) { if (state_ == started) { simcall_comm_wait(pimpl_, timeout); state_ = finished; - pimpl_->unref(); return; } @@ -143,8 +138,6 @@ void Comm::wait(double timeout) { userData_, timeout, rate_); } state_ = finished; - if (pimpl_) - pimpl_->unref(); } void Comm::send_detached(MailboxPtr dest, void* data, int simulatedSize) @@ -194,7 +187,6 @@ bool Comm::test() { if(simcall_comm_test(pimpl_)){ state_ = finished; - pimpl_->unref(); return true; } return false; diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index 4a53a46f6b..9b499496d4 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -70,7 +70,8 @@ public: /* Refcounting */ private: - std::atomic_int_fast32_t refcount_{1}; + std::atomic_int_fast32_t refcount_{0}; + public: friend void intrusive_ptr_add_ref(ActorImpl* process) { diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index fed1099e36..5e15eb5ed3 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -18,6 +18,10 @@ static inline smx_actor_t simcall_process_kill__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_kill__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_kill__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -25,6 +29,10 @@ static inline void simcall_process_kill__set__process(smx_simcall_t simcall, smx static inline int simcall_process_killall__get__reset_pid(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline int simcall_process_killall__getraw__reset_pid(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_killall__set__reset_pid(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -32,6 +40,10 @@ static inline void simcall_process_killall__set__reset_pid(smx_simcall_t simcall static inline smx_actor_t simcall_process_cleanup__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_cleanup__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_cleanup__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -39,6 +51,10 @@ static inline void simcall_process_cleanup__set__process(smx_simcall_t simcall, static inline smx_actor_t simcall_process_suspend__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_suspend__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_suspend__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -46,6 +62,10 @@ static inline void simcall_process_suspend__set__process(smx_simcall_t simcall, static inline smx_actor_t simcall_process_resume__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_resume__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_resume__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -53,12 +73,20 @@ static inline void simcall_process_resume__set__process(smx_simcall_t simcall, s static inline smx_actor_t simcall_process_set_host__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_set_host__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_set_host__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline sg_host_t simcall_process_set_host__get__dest(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline sg_host_t simcall_process_set_host__getraw__dest(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_process_set_host__set__dest(smx_simcall_t simcall, sg_host_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } @@ -66,12 +94,20 @@ static inline void simcall_process_set_host__set__dest(smx_simcall_t simcall, sg static inline smx_actor_t simcall_process_is_suspended__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_is_suspended__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_is_suspended__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int simcall_process_is_suspended__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_process_is_suspended__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_process_is_suspended__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -79,18 +115,30 @@ static inline void simcall_process_is_suspended__set__result(smx_simcall_t simca static inline smx_actor_t simcall_process_join__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_join__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_join__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline double simcall_process_join__get__timeout(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline double simcall_process_join__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_process_join__set__timeout(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline int simcall_process_join__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_process_join__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_process_join__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -98,12 +146,20 @@ static inline void simcall_process_join__set__result(smx_simcall_t simcall, int static inline double simcall_process_sleep__get__duration(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline double simcall_process_sleep__getraw__duration(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_sleep__set__duration(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int simcall_process_sleep__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_process_sleep__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_process_sleep__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -111,131 +167,249 @@ static inline void simcall_process_sleep__set__result(smx_simcall_t simcall, int static inline const char* simcall_execution_start__get__name(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline const char* simcall_execution_start__getraw__name(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_execution_start__set__name(smx_simcall_t simcall, const char* arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline double simcall_execution_start__get__flops_amount(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline double simcall_execution_start__getraw__flops_amount(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_execution_start__set__flops_amount(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline double simcall_execution_start__get__priority(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline double simcall_execution_start__getraw__priority(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_execution_start__set__priority(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline double simcall_execution_start__get__bound(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[3]); } +static inline double simcall_execution_start__getraw__bound(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[3]); +} static inline void simcall_execution_start__set__bound(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[3], arg); } -static inline smx_activity_t simcall_execution_start__get__result(smx_simcall_t simcall){ - return simgrid::simix::unmarshal(simcall->result); +static inline boost::intrusive_ptr +simcall_execution_start__get__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->result); } -static inline void simcall_execution_start__set__result(smx_simcall_t simcall, smx_activity_t result){ - simgrid::simix::marshal(simcall->result, result); +static inline simgrid::kernel::activity::ActivityImpl* simcall_execution_start__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} +static inline void +simcall_execution_start__set__result(smx_simcall_t simcall, + boost::intrusive_ptr result) +{ + simgrid::simix::marshal>(simcall->result, result); } static inline const char* simcall_execution_parallel_start__get__name(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline const char* simcall_execution_parallel_start__getraw__name(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_execution_parallel_start__set__name(smx_simcall_t simcall, const char* arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int simcall_execution_parallel_start__get__host_nb(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline int simcall_execution_parallel_start__getraw__host_nb(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_execution_parallel_start__set__host_nb(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline sg_host_t* simcall_execution_parallel_start__get__host_list(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline sg_host_t* simcall_execution_parallel_start__getraw__host_list(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_execution_parallel_start__set__host_list(smx_simcall_t simcall, sg_host_t* arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline double* simcall_execution_parallel_start__get__flops_amount(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[3]); } +static inline double* simcall_execution_parallel_start__getraw__flops_amount(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[3]); +} static inline void simcall_execution_parallel_start__set__flops_amount(smx_simcall_t simcall, double* arg) { simgrid::simix::marshal(simcall->args[3], arg); } static inline double* simcall_execution_parallel_start__get__bytes_amount(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[4]); } +static inline double* simcall_execution_parallel_start__getraw__bytes_amount(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[4]); +} static inline void simcall_execution_parallel_start__set__bytes_amount(smx_simcall_t simcall, double* arg) { simgrid::simix::marshal(simcall->args[4], arg); } static inline double simcall_execution_parallel_start__get__amount(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[5]); } +static inline double simcall_execution_parallel_start__getraw__amount(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[5]); +} static inline void simcall_execution_parallel_start__set__amount(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[5], arg); } static inline double simcall_execution_parallel_start__get__rate(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[6]); } +static inline double simcall_execution_parallel_start__getraw__rate(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[6]); +} static inline void simcall_execution_parallel_start__set__rate(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[6], arg); } static inline double simcall_execution_parallel_start__get__timeout(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[7]); } +static inline double simcall_execution_parallel_start__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[7]); +} static inline void simcall_execution_parallel_start__set__timeout(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[7], arg); } -static inline smx_activity_t simcall_execution_parallel_start__get__result(smx_simcall_t simcall){ - return simgrid::simix::unmarshal(simcall->result); +static inline boost::intrusive_ptr +simcall_execution_parallel_start__get__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->result); } -static inline void simcall_execution_parallel_start__set__result(smx_simcall_t simcall, smx_activity_t result){ - simgrid::simix::marshal(simcall->result, result); +static inline simgrid::kernel::activity::ActivityImpl* +simcall_execution_parallel_start__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); } - -static inline smx_activity_t simcall_execution_cancel__get__execution(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[0]); -} -static inline void simcall_execution_cancel__set__execution(smx_simcall_t simcall, smx_activity_t arg) { - simgrid::simix::marshal(simcall->args[0], arg); +static inline void +simcall_execution_parallel_start__set__result(smx_simcall_t simcall, + boost::intrusive_ptr result) +{ + simgrid::simix::marshal>(simcall->result, result); } -static inline smx_activity_t simcall_execution_set_priority__get__execution(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[0]); +static inline boost::intrusive_ptr +simcall_execution_cancel__get__execution(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->args[0]); +} +static inline simgrid::kernel::activity::ActivityImpl* +simcall_execution_cancel__getraw__execution(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} +static inline void +simcall_execution_cancel__set__execution(smx_simcall_t simcall, + boost::intrusive_ptr arg) +{ + simgrid::simix::marshal>(simcall->args[0], arg); } -static inline void simcall_execution_set_priority__set__execution(smx_simcall_t simcall, smx_activity_t arg) { - simgrid::simix::marshal(simcall->args[0], arg); + +static inline boost::intrusive_ptr +simcall_execution_set_priority__get__execution(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->args[0]); +} +static inline simgrid::kernel::activity::ActivityImpl* +simcall_execution_set_priority__getraw__execution(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} +static inline void +simcall_execution_set_priority__set__execution(smx_simcall_t simcall, + boost::intrusive_ptr arg) +{ + simgrid::simix::marshal>(simcall->args[0], arg); } static inline double simcall_execution_set_priority__get__priority(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline double simcall_execution_set_priority__getraw__priority(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_execution_set_priority__set__priority(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[1], arg); } -static inline smx_activity_t simcall_execution_set_bound__get__execution(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[0]); -} -static inline void simcall_execution_set_bound__set__execution(smx_simcall_t simcall, smx_activity_t arg) { - simgrid::simix::marshal(simcall->args[0], arg); +static inline boost::intrusive_ptr +simcall_execution_set_bound__get__execution(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->args[0]); +} +static inline simgrid::kernel::activity::ActivityImpl* +simcall_execution_set_bound__getraw__execution(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} +static inline void +simcall_execution_set_bound__set__execution(smx_simcall_t simcall, + boost::intrusive_ptr arg) +{ + simgrid::simix::marshal>(simcall->args[0], arg); } static inline double simcall_execution_set_bound__get__bound(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline double simcall_execution_set_bound__getraw__bound(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_execution_set_bound__set__bound(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[1], arg); } -static inline smx_activity_t simcall_execution_wait__get__execution(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[0]); +static inline boost::intrusive_ptr +simcall_execution_wait__get__execution(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->args[0]); } -static inline void simcall_execution_wait__set__execution(smx_simcall_t simcall, smx_activity_t arg) { - simgrid::simix::marshal(simcall->args[0], arg); +static inline simgrid::kernel::activity::ActivityImpl* simcall_execution_wait__getraw__execution(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} +static inline void +simcall_execution_wait__set__execution(smx_simcall_t simcall, + boost::intrusive_ptr arg) +{ + simgrid::simix::marshal>(simcall->args[0], arg); } static inline int simcall_execution_wait__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_execution_wait__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_execution_wait__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -243,18 +417,30 @@ static inline void simcall_execution_wait__set__result(smx_simcall_t simcall, in static inline smx_actor_t simcall_process_on_exit__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_on_exit__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_on_exit__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int_f_pvoid_pvoid_t simcall_process_on_exit__get__fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline int_f_pvoid_pvoid_t simcall_process_on_exit__getraw__fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_process_on_exit__set__fun(smx_simcall_t simcall, int_f_pvoid_pvoid_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline void* simcall_process_on_exit__get__data(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline void* simcall_process_on_exit__getraw__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_process_on_exit__set__data(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[2], arg); } @@ -262,12 +448,20 @@ static inline void simcall_process_on_exit__set__data(smx_simcall_t simcall, voi static inline smx_actor_t simcall_process_auto_restart_set__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_auto_restart_set__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_auto_restart_set__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int simcall_process_auto_restart_set__get__auto_restart(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline int simcall_process_auto_restart_set__getraw__auto_restart(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_process_auto_restart_set__set__auto_restart(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[1], arg); } @@ -275,12 +469,20 @@ static inline void simcall_process_auto_restart_set__set__auto_restart(smx_simca static inline smx_actor_t simcall_process_restart__get__process(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_process_restart__getraw__process(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_process_restart__set__process(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline smx_actor_t simcall_process_restart__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline smx_actor_t simcall_process_restart__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_process_restart__set__result(smx_simcall_t simcall, smx_actor_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -288,103 +490,176 @@ static inline void simcall_process_restart__set__result(smx_simcall_t simcall, s static inline smx_mailbox_t simcall_comm_iprobe__get__mbox(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_mailbox_t simcall_comm_iprobe__getraw__mbox(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_comm_iprobe__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int simcall_comm_iprobe__get__type(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline int simcall_comm_iprobe__getraw__type(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_comm_iprobe__set__type(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline int simcall_comm_iprobe__get__src(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline int simcall_comm_iprobe__getraw__src(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_comm_iprobe__set__src(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline int simcall_comm_iprobe__get__tag(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[3]); } +static inline int simcall_comm_iprobe__getraw__tag(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[3]); +} static inline void simcall_comm_iprobe__set__tag(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[3], arg); } static inline simix_match_func_t simcall_comm_iprobe__get__match_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[4]); } +static inline simix_match_func_t simcall_comm_iprobe__getraw__match_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[4]); +} static inline void simcall_comm_iprobe__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg) { simgrid::simix::marshal(simcall->args[4], arg); } static inline void* simcall_comm_iprobe__get__data(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[5]); } +static inline void* simcall_comm_iprobe__getraw__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[5]); +} static inline void simcall_comm_iprobe__set__data(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[5], arg); } -static inline smx_activity_t simcall_comm_iprobe__get__result(smx_simcall_t simcall){ - return simgrid::simix::unmarshal(simcall->result); +static inline boost::intrusive_ptr +simcall_comm_iprobe__get__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->result); } -static inline void simcall_comm_iprobe__set__result(smx_simcall_t simcall, smx_activity_t result){ - simgrid::simix::marshal(simcall->result, result); +static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_iprobe__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} +static inline void +simcall_comm_iprobe__set__result(smx_simcall_t simcall, + boost::intrusive_ptr result) +{ + simgrid::simix::marshal>(simcall->result, result); } static inline smx_actor_t simcall_comm_send__get__sender(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_comm_send__getraw__sender(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_comm_send__set__sender(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline smx_mailbox_t simcall_comm_send__get__mbox(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline smx_mailbox_t simcall_comm_send__getraw__mbox(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_comm_send__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline double simcall_comm_send__get__task_size(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline double simcall_comm_send__getraw__task_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_comm_send__set__task_size(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline double simcall_comm_send__get__rate(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[3]); } +static inline double simcall_comm_send__getraw__rate(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[3]); +} static inline void simcall_comm_send__set__rate(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[3], arg); } static inline void* simcall_comm_send__get__src_buff(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[4]); } +static inline void* simcall_comm_send__getraw__src_buff(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[4]); +} static inline void simcall_comm_send__set__src_buff(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[4], arg); } static inline size_t simcall_comm_send__get__src_buff_size(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[5]); } +static inline size_t simcall_comm_send__getraw__src_buff_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[5]); +} static inline void simcall_comm_send__set__src_buff_size(smx_simcall_t simcall, size_t arg) { simgrid::simix::marshal(simcall->args[5], arg); } static inline simix_match_func_t simcall_comm_send__get__match_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[6]); } +static inline simix_match_func_t simcall_comm_send__getraw__match_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[6]); +} static inline void simcall_comm_send__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg) { simgrid::simix::marshal(simcall->args[6], arg); } static inline simix_copy_data_func_t simcall_comm_send__get__copy_data_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[7]); } +static inline simix_copy_data_func_t simcall_comm_send__getraw__copy_data_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[7]); +} static inline void simcall_comm_send__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg) { simgrid::simix::marshal(simcall->args[7], arg); } static inline void* simcall_comm_send__get__data(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[8]); } +static inline void* simcall_comm_send__getraw__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[8]); +} static inline void simcall_comm_send__set__data(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[8], arg); } static inline double simcall_comm_send__get__timeout(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[9]); } +static inline double simcall_comm_send__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[9]); +} static inline void simcall_comm_send__set__timeout(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[9], arg); } @@ -392,127 +667,215 @@ static inline void simcall_comm_send__set__timeout(smx_simcall_t simcall, double static inline smx_actor_t simcall_comm_isend__get__sender(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_comm_isend__getraw__sender(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_comm_isend__set__sender(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline smx_mailbox_t simcall_comm_isend__get__mbox(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline smx_mailbox_t simcall_comm_isend__getraw__mbox(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_comm_isend__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline double simcall_comm_isend__get__task_size(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline double simcall_comm_isend__getraw__task_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_comm_isend__set__task_size(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline double simcall_comm_isend__get__rate(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[3]); } +static inline double simcall_comm_isend__getraw__rate(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[3]); +} static inline void simcall_comm_isend__set__rate(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[3], arg); } static inline void* simcall_comm_isend__get__src_buff(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[4]); } +static inline void* simcall_comm_isend__getraw__src_buff(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[4]); +} static inline void simcall_comm_isend__set__src_buff(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[4], arg); } static inline size_t simcall_comm_isend__get__src_buff_size(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[5]); } +static inline size_t simcall_comm_isend__getraw__src_buff_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[5]); +} static inline void simcall_comm_isend__set__src_buff_size(smx_simcall_t simcall, size_t arg) { simgrid::simix::marshal(simcall->args[5], arg); } static inline simix_match_func_t simcall_comm_isend__get__match_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[6]); } +static inline simix_match_func_t simcall_comm_isend__getraw__match_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[6]); +} static inline void simcall_comm_isend__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg) { simgrid::simix::marshal(simcall->args[6], arg); } static inline simix_clean_func_t simcall_comm_isend__get__clean_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[7]); } +static inline simix_clean_func_t simcall_comm_isend__getraw__clean_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[7]); +} static inline void simcall_comm_isend__set__clean_fun(smx_simcall_t simcall, simix_clean_func_t arg) { simgrid::simix::marshal(simcall->args[7], arg); } static inline simix_copy_data_func_t simcall_comm_isend__get__copy_data_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[8]); } +static inline simix_copy_data_func_t simcall_comm_isend__getraw__copy_data_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[8]); +} static inline void simcall_comm_isend__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg) { simgrid::simix::marshal(simcall->args[8], arg); } static inline void* simcall_comm_isend__get__data(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[9]); } +static inline void* simcall_comm_isend__getraw__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[9]); +} static inline void simcall_comm_isend__set__data(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[9], arg); } static inline int simcall_comm_isend__get__detached(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[10]); } +static inline int simcall_comm_isend__getraw__detached(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[10]); +} static inline void simcall_comm_isend__set__detached(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[10], arg); } -static inline smx_activity_t simcall_comm_isend__get__result(smx_simcall_t simcall){ - return simgrid::simix::unmarshal(simcall->result); +static inline boost::intrusive_ptr +simcall_comm_isend__get__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->result); } -static inline void simcall_comm_isend__set__result(smx_simcall_t simcall, smx_activity_t result){ - simgrid::simix::marshal(simcall->result, result); +static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_isend__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} +static inline void simcall_comm_isend__set__result(smx_simcall_t simcall, + boost::intrusive_ptr result) +{ + simgrid::simix::marshal>(simcall->result, result); } static inline smx_actor_t simcall_comm_recv__get__receiver(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_comm_recv__getraw__receiver(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_comm_recv__set__receiver(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline smx_mailbox_t simcall_comm_recv__get__mbox(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline smx_mailbox_t simcall_comm_recv__getraw__mbox(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_comm_recv__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline void* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline void* simcall_comm_recv__getraw__dst_buff(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline size_t* simcall_comm_recv__get__dst_buff_size(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[3]); } +static inline size_t* simcall_comm_recv__getraw__dst_buff_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[3]); +} static inline void simcall_comm_recv__set__dst_buff_size(smx_simcall_t simcall, size_t* arg) { simgrid::simix::marshal(simcall->args[3], arg); } static inline simix_match_func_t simcall_comm_recv__get__match_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[4]); } +static inline simix_match_func_t simcall_comm_recv__getraw__match_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[4]); +} static inline void simcall_comm_recv__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg) { simgrid::simix::marshal(simcall->args[4], arg); } static inline simix_copy_data_func_t simcall_comm_recv__get__copy_data_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[5]); } +static inline simix_copy_data_func_t simcall_comm_recv__getraw__copy_data_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[5]); +} static inline void simcall_comm_recv__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg) { simgrid::simix::marshal(simcall->args[5], arg); } static inline void* simcall_comm_recv__get__data(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[6]); } +static inline void* simcall_comm_recv__getraw__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[6]); +} static inline void simcall_comm_recv__set__data(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[6], arg); } static inline double simcall_comm_recv__get__timeout(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[7]); } +static inline double simcall_comm_recv__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[7]); +} static inline void simcall_comm_recv__set__timeout(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[7], arg); } static inline double simcall_comm_recv__get__rate(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[8]); } +static inline double simcall_comm_recv__getraw__rate(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[8]); +} static inline void simcall_comm_recv__set__rate(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[8], arg); } @@ -520,118 +883,210 @@ static inline void simcall_comm_recv__set__rate(smx_simcall_t simcall, double ar static inline smx_actor_t simcall_comm_irecv__get__receiver(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_actor_t simcall_comm_irecv__getraw__receiver(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_comm_irecv__set__receiver(smx_simcall_t simcall, smx_actor_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline smx_mailbox_t simcall_comm_irecv__get__mbox(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline smx_mailbox_t simcall_comm_irecv__getraw__mbox(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_comm_irecv__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline void* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline void* simcall_comm_irecv__getraw__dst_buff(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline size_t* simcall_comm_irecv__get__dst_buff_size(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[3]); } +static inline size_t* simcall_comm_irecv__getraw__dst_buff_size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[3]); +} static inline void simcall_comm_irecv__set__dst_buff_size(smx_simcall_t simcall, size_t* arg) { simgrid::simix::marshal(simcall->args[3], arg); } static inline simix_match_func_t simcall_comm_irecv__get__match_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[4]); } +static inline simix_match_func_t simcall_comm_irecv__getraw__match_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[4]); +} static inline void simcall_comm_irecv__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg) { simgrid::simix::marshal(simcall->args[4], arg); } static inline simix_copy_data_func_t simcall_comm_irecv__get__copy_data_fun(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[5]); } +static inline simix_copy_data_func_t simcall_comm_irecv__getraw__copy_data_fun(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[5]); +} static inline void simcall_comm_irecv__set__copy_data_fun(smx_simcall_t simcall, simix_copy_data_func_t arg) { simgrid::simix::marshal(simcall->args[5], arg); } static inline void* simcall_comm_irecv__get__data(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[6]); } +static inline void* simcall_comm_irecv__getraw__data(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[6]); +} static inline void simcall_comm_irecv__set__data(smx_simcall_t simcall, void* arg) { simgrid::simix::marshal(simcall->args[6], arg); } static inline double simcall_comm_irecv__get__rate(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[7]); } +static inline double simcall_comm_irecv__getraw__rate(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[7]); +} static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[7], arg); } -static inline smx_activity_t simcall_comm_irecv__get__result(smx_simcall_t simcall){ - return simgrid::simix::unmarshal(simcall->result); +static inline boost::intrusive_ptr +simcall_comm_irecv__get__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->result); } -static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, smx_activity_t result){ - simgrid::simix::marshal(simcall->result, result); +static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_irecv__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} +static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, + boost::intrusive_ptr result) +{ + simgrid::simix::marshal>(simcall->result, result); } static inline xbt_dynar_t simcall_comm_waitany__get__comms(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline xbt_dynar_t simcall_comm_waitany__getraw__comms(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_comm_waitany__set__comms(smx_simcall_t simcall, xbt_dynar_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline double simcall_comm_waitany__get__timeout(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline double simcall_comm_waitany__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_comm_waitany__set__timeout(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline int simcall_comm_waitany__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_comm_waitany__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_comm_waitany__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } -static inline smx_activity_t simcall_comm_wait__get__comm(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[0]); +static inline boost::intrusive_ptr +simcall_comm_wait__get__comm(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->args[0]); +} +static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_wait__getraw__comm(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_comm_wait__set__comm(smx_simcall_t simcall, smx_activity_t arg) { - simgrid::simix::marshal(simcall->args[0], arg); +static inline void simcall_comm_wait__set__comm(smx_simcall_t simcall, + boost::intrusive_ptr arg) +{ + simgrid::simix::marshal>(simcall->args[0], arg); } static inline double simcall_comm_wait__get__timeout(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline double simcall_comm_wait__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_comm_wait__set__timeout(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[1], arg); } -static inline smx_activity_t simcall_comm_test__get__comm(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[0]); +static inline boost::intrusive_ptr +simcall_comm_test__get__comm(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->args[0]); +} +static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_test__getraw__comm(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, smx_activity_t arg) { - simgrid::simix::marshal(simcall->args[0], arg); +static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, + boost::intrusive_ptr arg) +{ + simgrid::simix::marshal>(simcall->args[0], arg); } static inline int simcall_comm_test__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_comm_test__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_comm_test__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } -static inline smx_activity_t* simcall_comm_testany__get__comms(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[0]); +static inline boost::intrusive_ptr* +simcall_comm_testany__get__comms(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal*>(simcall->args[0]); +} +static inline simgrid::kernel::activity::ActivityImpl** simcall_comm_testany__getraw__comms(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, smx_activity_t* arg) { - simgrid::simix::marshal(simcall->args[0], arg); +static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, + boost::intrusive_ptr* arg) +{ + simgrid::simix::marshal*>(simcall->args[0], arg); } static inline size_t simcall_comm_testany__get__count(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline size_t simcall_comm_testany__getraw__count(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_comm_testany__set__count(smx_simcall_t simcall, size_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline int simcall_comm_testany__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_comm_testany__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -639,6 +1094,10 @@ static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int static inline smx_mutex_t simcall_mutex_init__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline smx_mutex_t simcall_mutex_init__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_mutex_init__set__result(smx_simcall_t simcall, smx_mutex_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -646,6 +1105,10 @@ static inline void simcall_mutex_init__set__result(smx_simcall_t simcall, smx_mu static inline smx_mutex_t simcall_mutex_lock__get__mutex(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_mutex_t simcall_mutex_lock__getraw__mutex(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_mutex_lock__set__mutex(smx_simcall_t simcall, smx_mutex_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -653,12 +1116,20 @@ static inline void simcall_mutex_lock__set__mutex(smx_simcall_t simcall, smx_mut static inline smx_mutex_t simcall_mutex_trylock__get__mutex(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_mutex_t simcall_mutex_trylock__getraw__mutex(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_mutex_trylock__set__mutex(smx_simcall_t simcall, smx_mutex_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int simcall_mutex_trylock__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_mutex_trylock__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_mutex_trylock__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -666,6 +1137,10 @@ static inline void simcall_mutex_trylock__set__result(smx_simcall_t simcall, int static inline smx_mutex_t simcall_mutex_unlock__get__mutex(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_mutex_t simcall_mutex_unlock__getraw__mutex(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_mutex_unlock__set__mutex(smx_simcall_t simcall, smx_mutex_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -673,6 +1148,10 @@ static inline void simcall_mutex_unlock__set__mutex(smx_simcall_t simcall, smx_m static inline smx_cond_t simcall_cond_init__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline smx_cond_t simcall_cond_init__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_cond_init__set__result(smx_simcall_t simcall, smx_cond_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -680,6 +1159,10 @@ static inline void simcall_cond_init__set__result(smx_simcall_t simcall, smx_con static inline smx_cond_t simcall_cond_signal__get__cond(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_cond_t simcall_cond_signal__getraw__cond(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_cond_signal__set__cond(smx_simcall_t simcall, smx_cond_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -687,12 +1170,20 @@ static inline void simcall_cond_signal__set__cond(smx_simcall_t simcall, smx_con static inline smx_cond_t simcall_cond_wait__get__cond(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_cond_t simcall_cond_wait__getraw__cond(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_cond_wait__set__cond(smx_simcall_t simcall, smx_cond_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline smx_mutex_t simcall_cond_wait__get__mutex(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline smx_mutex_t simcall_cond_wait__getraw__mutex(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_cond_wait__set__mutex(smx_simcall_t simcall, smx_mutex_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } @@ -700,18 +1191,30 @@ static inline void simcall_cond_wait__set__mutex(smx_simcall_t simcall, smx_mute static inline smx_cond_t simcall_cond_wait_timeout__get__cond(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_cond_t simcall_cond_wait_timeout__getraw__cond(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_cond_wait_timeout__set__cond(smx_simcall_t simcall, smx_cond_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline smx_mutex_t simcall_cond_wait_timeout__get__mutex(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline smx_mutex_t simcall_cond_wait_timeout__getraw__mutex(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_cond_wait_timeout__set__mutex(smx_simcall_t simcall, smx_mutex_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline double simcall_cond_wait_timeout__get__timeout(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline double simcall_cond_wait_timeout__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_cond_wait_timeout__set__timeout(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[2], arg); } @@ -719,6 +1222,10 @@ static inline void simcall_cond_wait_timeout__set__timeout(smx_simcall_t simcall static inline smx_cond_t simcall_cond_broadcast__get__cond(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_cond_t simcall_cond_broadcast__getraw__cond(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_cond_broadcast__set__cond(smx_simcall_t simcall, smx_cond_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -726,12 +1233,20 @@ static inline void simcall_cond_broadcast__set__cond(smx_simcall_t simcall, smx_ static inline unsigned int simcall_sem_init__get__capacity(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline unsigned int simcall_sem_init__getraw__capacity(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_sem_init__set__capacity(smx_simcall_t simcall, unsigned int arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline smx_sem_t simcall_sem_init__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline smx_sem_t simcall_sem_init__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_sem_init__set__result(smx_simcall_t simcall, smx_sem_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -739,6 +1254,10 @@ static inline void simcall_sem_init__set__result(smx_simcall_t simcall, smx_sem_ static inline smx_sem_t simcall_sem_release__get__sem(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_sem_t simcall_sem_release__getraw__sem(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_sem_release__set__sem(smx_simcall_t simcall, smx_sem_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -746,12 +1265,20 @@ static inline void simcall_sem_release__set__sem(smx_simcall_t simcall, smx_sem_ static inline smx_sem_t simcall_sem_would_block__get__sem(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_sem_t simcall_sem_would_block__getraw__sem(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_sem_would_block__set__sem(smx_simcall_t simcall, smx_sem_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int simcall_sem_would_block__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_sem_would_block__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_sem_would_block__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -759,6 +1286,10 @@ static inline void simcall_sem_would_block__set__result(smx_simcall_t simcall, i static inline smx_sem_t simcall_sem_acquire__get__sem(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_sem_t simcall_sem_acquire__getraw__sem(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_sem_acquire__set__sem(smx_simcall_t simcall, smx_sem_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -766,12 +1297,20 @@ static inline void simcall_sem_acquire__set__sem(smx_simcall_t simcall, smx_sem_ static inline smx_sem_t simcall_sem_acquire_timeout__get__sem(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_sem_t simcall_sem_acquire_timeout__getraw__sem(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_sem_acquire_timeout__set__sem(smx_simcall_t simcall, smx_sem_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline double simcall_sem_acquire_timeout__get__timeout(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline double simcall_sem_acquire_timeout__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_sem_acquire_timeout__set__timeout(smx_simcall_t simcall, double arg) { simgrid::simix::marshal(simcall->args[1], arg); } @@ -779,12 +1318,20 @@ static inline void simcall_sem_acquire_timeout__set__timeout(smx_simcall_t simca static inline smx_sem_t simcall_sem_get_capacity__get__sem(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_sem_t simcall_sem_get_capacity__getraw__sem(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_sem_get_capacity__set__sem(smx_simcall_t simcall, smx_sem_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int simcall_sem_get_capacity__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_sem_get_capacity__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_sem_get_capacity__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -792,24 +1339,40 @@ static inline void simcall_sem_get_capacity__set__result(smx_simcall_t simcall, static inline smx_file_t simcall_file_read__get__fd(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_file_t simcall_file_read__getraw__fd(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_read__set__fd(smx_simcall_t simcall, smx_file_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline sg_size_t simcall_file_read__get__size(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline sg_size_t simcall_file_read__getraw__size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_file_read__set__size(smx_simcall_t simcall, sg_size_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline sg_host_t simcall_file_read__get__host(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline sg_host_t simcall_file_read__getraw__host(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_file_read__set__host(smx_simcall_t simcall, sg_host_t arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline sg_size_t simcall_file_read__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline sg_size_t simcall_file_read__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_read__set__result(smx_simcall_t simcall, sg_size_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -817,24 +1380,40 @@ static inline void simcall_file_read__set__result(smx_simcall_t simcall, sg_size static inline smx_file_t simcall_file_write__get__fd(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_file_t simcall_file_write__getraw__fd(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_write__set__fd(smx_simcall_t simcall, smx_file_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline sg_size_t simcall_file_write__get__size(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline sg_size_t simcall_file_write__getraw__size(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_file_write__set__size(smx_simcall_t simcall, sg_size_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline sg_host_t simcall_file_write__get__host(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline sg_host_t simcall_file_write__getraw__host(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_file_write__set__host(smx_simcall_t simcall, sg_host_t arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline sg_size_t simcall_file_write__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline sg_size_t simcall_file_write__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_write__set__result(smx_simcall_t simcall, sg_size_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -842,18 +1421,30 @@ static inline void simcall_file_write__set__result(smx_simcall_t simcall, sg_siz static inline const char* simcall_file_open__get__fullpath(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline const char* simcall_file_open__getraw__fullpath(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_open__set__fullpath(smx_simcall_t simcall, const char* arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline sg_host_t simcall_file_open__get__host(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline sg_host_t simcall_file_open__getraw__host(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_file_open__set__host(smx_simcall_t simcall, sg_host_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline smx_file_t simcall_file_open__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline smx_file_t simcall_file_open__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_open__set__result(smx_simcall_t simcall, smx_file_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -861,18 +1452,30 @@ static inline void simcall_file_open__set__result(smx_simcall_t simcall, smx_fil static inline smx_file_t simcall_file_close__get__fd(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_file_t simcall_file_close__getraw__fd(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_close__set__fd(smx_simcall_t simcall, smx_file_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline sg_host_t simcall_file_close__get__host(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline sg_host_t simcall_file_close__getraw__host(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_file_close__set__host(smx_simcall_t simcall, sg_host_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline int simcall_file_close__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_file_close__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_close__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -880,18 +1483,30 @@ static inline void simcall_file_close__set__result(smx_simcall_t simcall, int re static inline smx_file_t simcall_file_unlink__get__fd(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_file_t simcall_file_unlink__getraw__fd(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_unlink__set__fd(smx_simcall_t simcall, smx_file_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline sg_host_t simcall_file_unlink__get__host(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline sg_host_t simcall_file_unlink__getraw__host(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_file_unlink__set__host(smx_simcall_t simcall, sg_host_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline int simcall_file_unlink__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_file_unlink__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_unlink__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -899,12 +1514,20 @@ static inline void simcall_file_unlink__set__result(smx_simcall_t simcall, int r static inline smx_file_t simcall_file_get_size__get__fd(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_file_t simcall_file_get_size__getraw__fd(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_get_size__set__fd(smx_simcall_t simcall, smx_file_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline sg_size_t simcall_file_get_size__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline sg_size_t simcall_file_get_size__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_get_size__set__result(smx_simcall_t simcall, sg_size_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -912,12 +1535,20 @@ static inline void simcall_file_get_size__set__result(smx_simcall_t simcall, sg_ static inline smx_file_t simcall_file_tell__get__fd(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_file_t simcall_file_tell__getraw__fd(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_tell__set__fd(smx_simcall_t simcall, smx_file_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline sg_size_t simcall_file_tell__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline sg_size_t simcall_file_tell__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_tell__set__result(smx_simcall_t simcall, sg_size_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -925,24 +1556,40 @@ static inline void simcall_file_tell__set__result(smx_simcall_t simcall, sg_size static inline smx_file_t simcall_file_seek__get__fd(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_file_t simcall_file_seek__getraw__fd(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_seek__set__fd(smx_simcall_t simcall, smx_file_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline sg_offset_t simcall_file_seek__get__offset(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline sg_offset_t simcall_file_seek__getraw__offset(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_file_seek__set__offset(smx_simcall_t simcall, sg_offset_t arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline int simcall_file_seek__get__origin(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[2]); } +static inline int simcall_file_seek__getraw__origin(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} static inline void simcall_file_seek__set__origin(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[2], arg); } static inline int simcall_file_seek__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_file_seek__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_seek__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -950,12 +1597,20 @@ static inline void simcall_file_seek__set__result(smx_simcall_t simcall, int res static inline smx_file_t simcall_file_get_info__get__fd(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_file_t simcall_file_get_info__getraw__fd(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_get_info__set__fd(smx_simcall_t simcall, smx_file_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline xbt_dynar_t simcall_file_get_info__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline xbt_dynar_t simcall_file_get_info__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_get_info__set__result(smx_simcall_t simcall, xbt_dynar_t result){ simgrid::simix::marshal(simcall->result, result); } @@ -963,18 +1618,30 @@ static inline void simcall_file_get_info__set__result(smx_simcall_t simcall, xbt static inline smx_file_t simcall_file_move__get__fd(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline smx_file_t simcall_file_move__getraw__fd(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_file_move__set__fd(smx_simcall_t simcall, smx_file_t arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline const char* simcall_file_move__get__fullpath(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline const char* simcall_file_move__getraw__fullpath(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_file_move__set__fullpath(smx_simcall_t simcall, const char* arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline int simcall_file_move__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_file_move__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_file_move__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } @@ -982,31 +1649,55 @@ static inline void simcall_file_move__set__result(smx_simcall_t simcall, int res static inline int simcall_mc_random__get__min(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); } +static inline int simcall_mc_random__getraw__min(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} static inline void simcall_mc_random__set__min(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[0], arg); } static inline int simcall_mc_random__get__max(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline int simcall_mc_random__getraw__max(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_mc_random__set__max(smx_simcall_t simcall, int arg) { simgrid::simix::marshal(simcall->args[1], arg); } static inline int simcall_mc_random__get__result(smx_simcall_t simcall){ return simgrid::simix::unmarshal(simcall->result); } +static inline int simcall_mc_random__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int result){ simgrid::simix::marshal(simcall->result, result); } -static inline smx_activity_t simcall_set_category__get__synchro(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[0]); +static inline boost::intrusive_ptr +simcall_set_category__get__synchro(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal>(simcall->args[0]); } -static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, smx_activity_t arg) { - simgrid::simix::marshal(simcall->args[0], arg); +static inline simgrid::kernel::activity::ActivityImpl* simcall_set_category__getraw__synchro(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} +static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, + boost::intrusive_ptr arg) +{ + simgrid::simix::marshal>(simcall->args[0], arg); } static inline const char* simcall_set_category__get__category(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[1]); } +static inline const char* simcall_set_category__getraw__category(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} static inline void simcall_set_category__set__category(smx_simcall_t simcall, const char* arg) { simgrid::simix::marshal(simcall->args[1], arg); } @@ -1014,6 +1705,10 @@ static inline void simcall_set_category__set__category(smx_simcall_t simcall, co static inline std::function const* simcall_run_kernel__get__code(smx_simcall_t simcall) { return simgrid::simix::unmarshal const*>(simcall->args[0]); } +static inline std::function const* simcall_run_kernel__getraw__code(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw const*>(simcall->args[0]); +} static inline void simcall_run_kernel__set__code(smx_simcall_t simcall, std::function const* arg) { simgrid::simix::marshal const*>(simcall->args[0], arg); } @@ -1021,6 +1716,10 @@ static inline void simcall_run_kernel__set__code(smx_simcall_t simcall, std::fun static inline std::function const* simcall_run_blocking__get__code(smx_simcall_t simcall) { return simgrid::simix::unmarshal const*>(simcall->args[0]); } +static inline std::function const* simcall_run_blocking__getraw__code(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw const*>(simcall->args[0]); +} static inline void simcall_run_blocking__set__code(smx_simcall_t simcall, std::function const* arg) { simgrid::simix::marshal const*>(simcall->args[0], arg); } @@ -1033,18 +1732,36 @@ XBT_PRIVATE void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_acto XBT_PRIVATE void simcall_HANDLER_process_set_host(smx_simcall_t simcall, smx_actor_t process, sg_host_t dest); XBT_PRIVATE void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t process, double timeout); XBT_PRIVATE void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration); -XBT_PRIVATE smx_activity_t simcall_HANDLER_execution_start(smx_simcall_t simcall, const char* name, double flops_amount, double priority, double bound); -XBT_PRIVATE void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_activity_t execution); +XBT_PRIVATE boost::intrusive_ptr +simcall_HANDLER_execution_start(smx_simcall_t simcall, const char* name, double flops_amount, double priority, + double bound); +XBT_PRIVATE void +simcall_HANDLER_execution_wait(smx_simcall_t simcall, + boost::intrusive_ptr execution); XBT_PRIVATE smx_actor_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_actor_t process); -XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data); +XBT_PRIVATE boost::intrusive_ptr +simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, int src, int tag, + simix_match_func_t match_fun, void* data); XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout); -XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached); +XBT_PRIVATE boost::intrusive_ptr +simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, + void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, + simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, + int detached); XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate); -XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate); +XBT_PRIVATE boost::intrusive_ptr +simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, + size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, + void* data, double rate); XBT_PRIVATE void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t comms, double timeout); -XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_activity_t comm, double timeout); -XBT_PRIVATE void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_activity_t comm); -XBT_PRIVATE void simcall_HANDLER_comm_testany(smx_simcall_t simcall, smx_activity_t* comms, size_t count); +XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, + boost::intrusive_ptr comm, + double timeout); +XBT_PRIVATE void simcall_HANDLER_comm_test(smx_simcall_t simcall, + boost::intrusive_ptr comm); +XBT_PRIVATE void simcall_HANDLER_comm_testany(smx_simcall_t simcall, + boost::intrusive_ptr* comms, + size_t count); XBT_PRIVATE smx_mutex_t simcall_HANDLER_mutex_init(smx_simcall_t simcall); XBT_PRIVATE void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex); XBT_PRIVATE int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex); diff --git a/src/simix/popping_bodies.cpp b/src/simix/popping_bodies.cpp index 2c1ad74d74..cafc761568 100644 --- a/src/simix/popping_bodies.cpp +++ b/src/simix/popping_bodies.cpp @@ -90,40 +90,61 @@ inline static int simcall_BODY_process_sleep(double duration) { return simcall(SIMCALL_PROCESS_SLEEP, duration); } -inline static smx_activity_t simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound) { + inline static boost::intrusive_ptr + simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) simcall_HANDLER_execution_start(&SIMIX_process_self()->simcall, name, flops_amount, priority, bound); - return simcall(SIMCALL_EXECUTION_START, name, flops_amount, priority, bound); + return simcall, const char*, double, double, double>( + SIMCALL_EXECUTION_START, name, flops_amount, priority, bound); } -inline static smx_activity_t simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate, double timeout) { + inline static boost::intrusive_ptr + simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, + double* bytes_amount, double amount, double rate, double timeout) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate, timeout); - return simcall(SIMCALL_EXECUTION_PARALLEL_START, name, host_nb, host_list, flops_amount, bytes_amount, amount, rate, timeout); + return simcall, const char*, int, sg_host_t*, double*, + double*, double, double, double>(SIMCALL_EXECUTION_PARALLEL_START, name, host_nb, host_list, + flops_amount, bytes_amount, amount, rate, timeout); } -inline static void simcall_BODY_execution_cancel(smx_activity_t execution) { + inline static void + simcall_BODY_execution_cancel(boost::intrusive_ptr execution) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) SIMIX_execution_cancel(execution); - return simcall(SIMCALL_EXECUTION_CANCEL, execution); + return simcall>(SIMCALL_EXECUTION_CANCEL, + execution); } -inline static void simcall_BODY_execution_set_priority(smx_activity_t execution, double priority) { + inline static void + simcall_BODY_execution_set_priority(boost::intrusive_ptr execution, + double priority) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) SIMIX_execution_set_priority(execution, priority); - return simcall(SIMCALL_EXECUTION_SET_PRIORITY, execution, priority); + return simcall, double>( + SIMCALL_EXECUTION_SET_PRIORITY, execution, priority); } -inline static void simcall_BODY_execution_set_bound(smx_activity_t execution, double bound) { + inline static void + simcall_BODY_execution_set_bound(boost::intrusive_ptr execution, + double bound) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) SIMIX_execution_set_bound(execution, bound); - return simcall(SIMCALL_EXECUTION_SET_BOUND, execution, bound); + return simcall, double>( + SIMCALL_EXECUTION_SET_BOUND, execution, bound); } -inline static int simcall_BODY_execution_wait(smx_activity_t execution) { + inline static int simcall_BODY_execution_wait(boost::intrusive_ptr execution) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) simcall_HANDLER_execution_wait(&SIMIX_process_self()->simcall, execution); - return simcall(SIMCALL_EXECUTION_WAIT, execution); + return simcall>(SIMCALL_EXECUTION_WAIT, + execution); } inline static void simcall_BODY_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data) { @@ -144,10 +165,13 @@ inline static smx_actor_t simcall_BODY_process_restart(smx_actor_t process) { return simcall(SIMCALL_PROCESS_RESTART, process); } -inline static smx_activity_t simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data) { + inline static boost::intrusive_ptr + simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) simcall_HANDLER_comm_iprobe(&SIMIX_process_self()->simcall, mbox, type, src, tag, match_fun, data); - return simcall(SIMCALL_COMM_IPROBE, mbox, type, src, tag, match_fun, data); + return simcall, smx_mailbox_t, int, int, int, + simix_match_func_t, void*>(SIMCALL_COMM_IPROBE, mbox, type, src, tag, match_fun, data); } inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) { @@ -156,10 +180,17 @@ inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox return simcall(SIMCALL_COMM_SEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout); } -inline static smx_activity_t simcall_BODY_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) { + inline static boost::intrusive_ptr + simcall_BODY_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, + size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, + simix_copy_data_func_t copy_data_fun, void* data, int detached) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) simcall_HANDLER_comm_isend(&SIMIX_process_self()->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached); - return simcall(SIMCALL_COMM_ISEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached); + return simcall, smx_actor_t, smx_mailbox_t, double, + double, void*, size_t, simix_match_func_t, simix_clean_func_t, simix_copy_data_func_t, void*, int>( + SIMCALL_COMM_ISEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, + data, detached); } inline static void simcall_BODY_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) { @@ -168,10 +199,15 @@ inline static void simcall_BODY_comm_recv(smx_actor_t receiver, smx_mailbox_t mb return simcall(SIMCALL_COMM_RECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate); } -inline static smx_activity_t simcall_BODY_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) { + inline static boost::intrusive_ptr + simcall_BODY_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, + simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) simcall_HANDLER_comm_irecv(&SIMIX_process_self()->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate); - return simcall(SIMCALL_COMM_IRECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate); + return simcall, smx_actor_t, smx_mailbox_t, void*, + size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double>( + SIMCALL_COMM_IRECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate); } inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms, double timeout) { @@ -180,22 +216,29 @@ inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms, double timeout) { return simcall(SIMCALL_COMM_WAITANY, comms, timeout); } -inline static void simcall_BODY_comm_wait(smx_activity_t comm, double timeout) { + inline static void simcall_BODY_comm_wait(boost::intrusive_ptr comm, + double timeout) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) simcall_HANDLER_comm_wait(&SIMIX_process_self()->simcall, comm, timeout); - return simcall(SIMCALL_COMM_WAIT, comm, timeout); + return simcall, double>(SIMCALL_COMM_WAIT, comm, + timeout); } -inline static int simcall_BODY_comm_test(smx_activity_t comm) { + inline static int simcall_BODY_comm_test(boost::intrusive_ptr comm) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) simcall_HANDLER_comm_test(&SIMIX_process_self()->simcall, comm); - return simcall(SIMCALL_COMM_TEST, comm); + return simcall>(SIMCALL_COMM_TEST, comm); } -inline static int simcall_BODY_comm_testany(smx_activity_t* comms, size_t count) { + inline static int simcall_BODY_comm_testany(boost::intrusive_ptr* comms, + size_t count) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) simcall_HANDLER_comm_testany(&SIMIX_process_self()->simcall, comms, count); - return simcall(SIMCALL_COMM_TESTANY, comms, count); + return simcall*, size_t>(SIMCALL_COMM_TESTANY, + comms, count); } inline static smx_mutex_t simcall_BODY_mutex_init() { @@ -354,10 +397,13 @@ inline static int simcall_BODY_mc_random(int min, int max) { return simcall(SIMCALL_MC_RANDOM, min, max); } -inline static void simcall_BODY_set_category(smx_activity_t synchro, const char* category) { + inline static void simcall_BODY_set_category(boost::intrusive_ptr synchro, + const char* category) + { /* Go to that function to follow the code flow through the simcall barrier */ if (0) SIMIX_set_category(synchro, category); - return simcall(SIMCALL_SET_CATEGORY, synchro, category); + return simcall, const char*>( + SIMCALL_SET_CATEGORY, synchro, category); } inline static void simcall_BODY_run_kernel(std::function const* code) { diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index e19ac64ec1..1a27a3acd1 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -137,33 +137,51 @@ case SIMCALL_PROCESS_SLEEP: break; case SIMCALL_EXECUTION_START: - simgrid::simix::marshal(simcall->result, simcall_HANDLER_execution_start(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]))); - SIMIX_simcall_answer(simcall); - break; + simgrid::simix::marshal>( + simcall->result, + simcall_HANDLER_execution_start(simcall, simgrid::simix::unmarshal(simcall->args[0]), + simgrid::simix::unmarshal(simcall->args[1]), + simgrid::simix::unmarshal(simcall->args[2]), + simgrid::simix::unmarshal(simcall->args[3]))); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_EXECUTION_PARALLEL_START: - simgrid::simix::marshal(simcall->result, SIMIX_execution_parallel_start(simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]))); - SIMIX_simcall_answer(simcall); - break; + simgrid::simix::marshal>( + simcall->result, + SIMIX_execution_parallel_start( + simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), + simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), + simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), + simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]))); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_EXECUTION_CANCEL: - SIMIX_execution_cancel(simgrid::simix::unmarshal(simcall->args[0])); - SIMIX_simcall_answer(simcall); - break; + SIMIX_execution_cancel( + simgrid::simix::unmarshal>(simcall->args[0])); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_EXECUTION_SET_PRIORITY: - SIMIX_execution_set_priority(simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - SIMIX_simcall_answer(simcall); - break; + SIMIX_execution_set_priority( + simgrid::simix::unmarshal>(simcall->args[0]), + simgrid::simix::unmarshal(simcall->args[1])); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_EXECUTION_SET_BOUND: - SIMIX_execution_set_bound(simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - SIMIX_simcall_answer(simcall); - break; + SIMIX_execution_set_bound( + simgrid::simix::unmarshal>(simcall->args[0]), + simgrid::simix::unmarshal(simcall->args[1])); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_EXECUTION_WAIT: - simcall_HANDLER_execution_wait(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; + simcall_HANDLER_execution_wait( + simcall, + simgrid::simix::unmarshal>(simcall->args[0])); + break; case SIMCALL_PROCESS_ON_EXIT: SIMIX_process_on_exit(simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2])); @@ -181,43 +199,75 @@ case SIMCALL_PROCESS_RESTART: break; case SIMCALL_COMM_IPROBE: - simgrid::simix::marshal(simcall->result, simcall_HANDLER_comm_iprobe(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]))); - SIMIX_simcall_answer(simcall); - break; + simgrid::simix::marshal>( + simcall->result, simcall_HANDLER_comm_iprobe(simcall, simgrid::simix::unmarshal(simcall->args[0]), + simgrid::simix::unmarshal(simcall->args[1]), + simgrid::simix::unmarshal(simcall->args[2]), + simgrid::simix::unmarshal(simcall->args[3]), + simgrid::simix::unmarshal(simcall->args[4]), + simgrid::simix::unmarshal(simcall->args[5]))); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_COMM_SEND: simcall_HANDLER_comm_send(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]), simgrid::simix::unmarshal(simcall->args[8]), simgrid::simix::unmarshal(simcall->args[9])); break; case SIMCALL_COMM_ISEND: - simgrid::simix::marshal(simcall->result, simcall_HANDLER_comm_isend(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]), simgrid::simix::unmarshal(simcall->args[8]), simgrid::simix::unmarshal(simcall->args[9]), simgrid::simix::unmarshal(simcall->args[10]))); - SIMIX_simcall_answer(simcall); - break; + simgrid::simix::marshal>( + simcall->result, + simcall_HANDLER_comm_isend( + simcall, simgrid::simix::unmarshal(simcall->args[0]), + simgrid::simix::unmarshal(simcall->args[1]), + simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), + simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), + simgrid::simix::unmarshal(simcall->args[6]), + simgrid::simix::unmarshal(simcall->args[7]), + simgrid::simix::unmarshal(simcall->args[8]), + simgrid::simix::unmarshal(simcall->args[9]), simgrid::simix::unmarshal(simcall->args[10]))); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_COMM_RECV: simcall_HANDLER_comm_recv(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]), simgrid::simix::unmarshal(simcall->args[8])); break; case SIMCALL_COMM_IRECV: - simgrid::simix::marshal(simcall->result, simcall_HANDLER_comm_irecv(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]))); - SIMIX_simcall_answer(simcall); - break; + simgrid::simix::marshal>( + simcall->result, simcall_HANDLER_comm_irecv(simcall, simgrid::simix::unmarshal(simcall->args[0]), + simgrid::simix::unmarshal(simcall->args[1]), + simgrid::simix::unmarshal(simcall->args[2]), + simgrid::simix::unmarshal(simcall->args[3]), + simgrid::simix::unmarshal(simcall->args[4]), + simgrid::simix::unmarshal(simcall->args[5]), + simgrid::simix::unmarshal(simcall->args[6]), + simgrid::simix::unmarshal(simcall->args[7]))); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_COMM_WAITANY: simcall_HANDLER_comm_waitany(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); break; case SIMCALL_COMM_WAIT: - simcall_HANDLER_comm_wait(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - break; + simcall_HANDLER_comm_wait( + simcall, + simgrid::simix::unmarshal>(simcall->args[0]), + simgrid::simix::unmarshal(simcall->args[1])); + break; case SIMCALL_COMM_TEST: - simcall_HANDLER_comm_test(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; + simcall_HANDLER_comm_test( + simcall, + simgrid::simix::unmarshal>(simcall->args[0])); + break; case SIMCALL_COMM_TESTANY: - simcall_HANDLER_comm_testany(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - break; + simcall_HANDLER_comm_testany( + simcall, + simgrid::simix::unmarshal*>(simcall->args[0]), + simgrid::simix::unmarshal(simcall->args[1])); + break; case SIMCALL_MUTEX_INIT: simgrid::simix::marshal(simcall->result, simcall_HANDLER_mutex_init(simcall)); @@ -341,9 +391,11 @@ case SIMCALL_MC_RANDOM: break; case SIMCALL_SET_CATEGORY: - SIMIX_set_category(simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - SIMIX_simcall_answer(simcall); - break; + SIMIX_set_category( + simgrid::simix::unmarshal>(simcall->args[0]), + simgrid::simix::unmarshal(simcall->args[1])); + SIMIX_simcall_answer(simcall); + break; case SIMCALL_RUN_KERNEL: SIMIX_run_kernel(simgrid::simix::unmarshal const*>(simcall->args[0])); diff --git a/src/simix/popping_private.h b/src/simix/popping_private.h index 389f89b407..934565c128 100644 --- a/src/simix/popping_private.h +++ b/src/simix/popping_private.h @@ -71,6 +71,20 @@ SG_END_DECL() #ifdef __cplusplus +/* Defines the marshal/unmarshal functions for each type of parameters. + * + * They will be used in popping_accessors.h to define the functions allowing + * to retrieve/set each parameter of each simcall. + * + * There is a unmarshal_raw() function, which is exactly similar to unmarshal() + * for all types but boost::intrusive_ptr(T). For that type, the unmarshal() + * function builds a new intrusive_ptr wrapping the pointer (that is stored raw + * within the simcall) while the unmarshal_raw retrieves the raw pointer. + * + * This is used in _getraw_ functions, that allow the + * model-checker, to read the data in the remote memory of the MCed. + */ + namespace simgrid { namespace simix { @@ -85,15 +99,11 @@ class type { }; template struct marshal_t {}; -#define SIMIX_MARSHAL(T, field) \ - inline void marshal(type, u_smx_scalar& simcall, T value) \ - { \ - simcall.field = value; \ - } \ - inline T unmarshal(type, u_smx_scalar const& simcall) \ - { \ - return simcall.field; \ - } +#define SIMIX_MARSHAL(T, field) \ + inline void marshal(type, u_smx_scalar& simcall, T value) { simcall.field = value; } \ + inline T unmarshal(type, u_smx_scalar const& simcall) { return simcall.field; } \ + inline T unmarshal_raw(type, u_smx_scalar const& simcall) \ + { /* Exactly same as unmarshal. It differs only for intrusive_ptr */ return simcall.field; } SIMIX_MARSHAL(char, c); SIMIX_MARSHAL(short, s); @@ -109,8 +119,12 @@ SIMIX_MARSHAL(float, d); SIMIX_MARSHAL(double, d); SIMIX_MARSHAL(FPtr, fp); -inline -void unmarshal(type, u_smx_scalar const& simcall) {} +inline void unmarshal(type, u_smx_scalar const& simcall) +{ +} +inline void unmarshal_raw(type, u_smx_scalar const& simcall) +{ +} template inline void marshal(type, u_smx_scalar& simcall, T* value) @@ -122,6 +136,10 @@ T* unmarshal(type, u_smx_scalar const& simcall) { return static_cast(simcall.dp); } +template inline T* unmarshal_raw(type, u_smx_scalar const& simcall) +{ + return static_cast(simcall.dp); +} template inline void marshal(type>, u_smx_scalar& simcall, boost::intrusive_ptr value) @@ -132,9 +150,13 @@ inline void marshal(type>, u_smx_scalar& simcall, boost: template inline boost::intrusive_ptr unmarshal(type>, u_smx_scalar const& simcall) { boost::intrusive_ptr res = boost::intrusive_ptr(static_cast(simcall.dp), false); - intrusive_ptr_release(&*res); + // intrusive_ptr_release(&*res); return res; } +template inline T* unmarshal_raw(type>, u_smx_scalar const& simcall) +{ + return static_cast(simcall.dp); +} template inline void marshal(type, u_smx_scalar& simcall, R(*value)(T...)) @@ -146,6 +168,10 @@ auto unmarshal(type, u_smx_scalar simcall) -> R(*)(T...) { return (R(*)(T...)) simcall.fp; } +template inline auto unmarshal_raw(type, u_smx_scalar simcall) -> R (*)(T...) +{ + return (R(*)(T...))simcall.fp; +} template inline void marshal(u_smx_scalar& simcall, T const& value) @@ -157,6 +183,10 @@ typename std::remove_reference::type unmarshal(u_smx_scalar& simcall) { return unmarshal(type(), simcall); } +template inline typename std::remove_reference::type unmarshal_raw(u_smx_scalar& simcall) +{ + return unmarshal(type(), simcall); +} template inline void marshalArgs(smx_simcall_t simcall) {} diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index 649adfae30..ad9ed06060 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -46,26 +46,26 @@ int process_is_suspended(smx_actor_t process) [[nohandler]]; int process_join(smx_actor_t process, double timeout) [[block]]; int process_sleep(double duration) [[block]]; -smx_activity_t execution_start(const char* name, double flops_amount, double priority, double bound); -smx_activity_t execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate, double timeout) [[nohandler]]; -void execution_cancel(smx_activity_t execution) [[nohandler]]; -void execution_set_priority(smx_activity_t execution, double priority) [[nohandler]]; -void execution_set_bound(smx_activity_t execution, double bound) [[nohandler]]; -int execution_wait(smx_activity_t execution) [[block]]; +boost::intrusive_ptr execution_start(const char* name, double flops_amount, double priority, double bound); +boost::intrusive_ptr execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate, double timeout) [[nohandler]]; +void execution_cancel(boost::intrusive_ptr execution) [[nohandler]]; +void execution_set_priority(boost::intrusive_ptr execution, double priority) [[nohandler]]; +void execution_set_bound(boost::intrusive_ptr execution, double bound) [[nohandler]]; +int execution_wait(boost::intrusive_ptr execution) [[block]]; void process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data) [[nohandler]]; void process_auto_restart_set(smx_actor_t process, int auto_restart) [[nohandler]]; smx_actor_t process_restart(smx_actor_t process); -smx_activity_t comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data); +boost::intrusive_ptr comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data); void comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) [[block]]; -smx_activity_t comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached); +boost::intrusive_ptr comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached); void comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) [[block]]; -smx_activity_t comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate); +boost::intrusive_ptr comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate); int comm_waitany(xbt_dynar_t comms, double timeout) [[block]]; -void comm_wait(smx_activity_t comm, double timeout) [[block]]; -int comm_test(smx_activity_t comm) [[block]]; -int comm_testany(smx_activity_t* comms, size_t count) [[block]]; +void comm_wait(boost::intrusive_ptr comm, double timeout) [[block]]; +int comm_test(boost::intrusive_ptr comm) [[block]]; +int comm_testany(boost::intrusive_ptr* comms, size_t count) [[block]]; smx_mutex_t mutex_init(); void mutex_lock(smx_mutex_t mutex) [[block]]; @@ -97,7 +97,7 @@ xbt_dynar_t file_get_info(smx_file_t fd); int file_move(smx_file_t fd, const char* fullpath); int mc_random(int min, int max); -void set_category(smx_activity_t synchro, const char* category) [[nohandler]]; +void set_category(boost::intrusive_ptr synchro, const char* category) [[nohandler]]; void run_kernel(std::function const* code) [[nohandler]]; void run_blocking(std::function const* code) [[block,nohandler]]; diff --git a/src/simix/simcalls.py b/src/simix/simcalls.py index 68635e5dd2..f846463b9c 100755 --- a/src/simix/simcalls.py +++ b/src/simix/simcalls.py @@ -80,14 +80,21 @@ class Simcall(object): def accessors(self): res = [] res.append('') + regex = re.compile(r"^boost::intrusive_ptr<(.*?)>(.*)$") # to compute the raw type # Arguments getter/setters for i in range(len(self.args)): arg = self.args[i] + rawtype = regex.sub(r'\1*\2', arg.rettype()) res.append('static inline %s simcall_%s__get__%s(smx_simcall_t simcall) {' % ( arg.rettype(), self.name, arg.name)) res.append( ' return simgrid::simix::unmarshal<%s>(simcall->args[%i]);' % (arg.rettype(), i)) res.append('}') + res.append('static inline %s simcall_%s__getraw__%s(smx_simcall_t simcall) {' % ( + rawtype, self.name, arg.name)) + res.append( + ' return simgrid::simix::unmarshal_raw<%s>(simcall->args[%i]);' % (rawtype, i)) + res.append('}') res.append('static inline void simcall_%s__set__%s(smx_simcall_t simcall, %s arg) {' % ( self.name, arg.name, arg.rettype())) res.append(' simgrid::simix::marshal<%s>(simcall->args[%i], arg);' % (arg.rettype(), i)) @@ -95,10 +102,15 @@ class Simcall(object): # Return value getter/setters if self.res.type != 'void': + rawtype = regex.sub(r'\1*\2', self.res.rettype()) res.append( 'static inline %s simcall_%s__get__result(smx_simcall_t simcall){' % (self.res.rettype(), self.name)) res.append(' return simgrid::simix::unmarshal<%s>(simcall->result);' % self.res.rettype()) res.append('}') + res.append( + 'static inline %s simcall_%s__getraw__result(smx_simcall_t simcall){' % (rawtype, self.name)) + res.append(' return simgrid::simix::unmarshal_raw<%s>(simcall->result);' % rawtype) + res.append('}') res.append( 'static inline void simcall_%s__set__result(smx_simcall_t simcall, %s result){' % (self.name, self.res.rettype())) res.append(' simgrid::simix::marshal<%s>(simcall->result, result);' % (self.res.rettype())) diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index 09b33a8804..6dc0a8ee72 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -27,10 +27,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_network, simix, "SIMIX network-related syn static void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall); static void SIMIX_comm_copy_data(smx_activity_t comm); static void SIMIX_comm_start(smx_activity_t synchro); -static simgrid::kernel::activity::CommImplPtr -_find_matching_comm(boost::circular_buffer_space_optimized* deque, e_smx_comm_type_t type, - int (*match_fun)(void*, void*, smx_activity_t), void* user_data, smx_activity_t my_synchro, - bool remove_matching); /** * \brief Checks if there is a communication activity queued in a deque matching our needs @@ -47,19 +43,18 @@ _find_matching_comm(boost::circular_buffer_space_optimized* dequ for(auto it = deque->begin(); it != deque->end(); it++){ smx_activity_t synchro = *it; simgrid::kernel::activity::CommImplPtr comm = - boost::dynamic_pointer_cast(synchro); + boost::dynamic_pointer_cast(std::move(synchro)); if (comm->type == SIMIX_COMM_SEND) { other_user_data = comm->src_data; } else if (comm->type == SIMIX_COMM_RECEIVE) { other_user_data = comm->dst_data; } - if (comm->type == type && (match_fun == nullptr || match_fun(this_user_data, other_user_data, synchro)) && + if (comm->type == type && (match_fun == nullptr || match_fun(this_user_data, other_user_data, comm)) && (not comm->match_fun || comm->match_fun(other_user_data, this_user_data, my_synchro))) { XBT_DEBUG("Found a matching communication synchro %p", comm); if (remove_matching) deque->erase(it); - comm->ref(); #if SIMGRID_HAVE_MC comm->mbox_cpy = comm->mbox; #endif @@ -100,7 +95,8 @@ XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx XBT_DEBUG("send from %p", mbox); /* Prepare a synchro describing us, so that it gets passed to the user-provided filter of other side */ - simgrid::kernel::activity::CommImpl* this_comm = new simgrid::kernel::activity::CommImpl(SIMIX_COMM_SEND); + simgrid::kernel::activity::CommImplPtr this_comm = + simgrid::kernel::activity::CommImplPtr(new simgrid::kernel::activity::CommImpl(SIMIX_COMM_SEND)); /* Look for communication synchro matching our needs. We also provide a description of * ourself so that the other side also gets a chance of choosing if it wants to match with us. @@ -112,21 +108,18 @@ XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx if (not other_comm) { other_comm = this_comm; - if (mbox->permanent_receiver!=nullptr){ + if (mbox->permanent_receiver != nullptr) { //this mailbox is for small messages, which have to be sent right now other_comm->state = SIMIX_READY; other_comm->dst_proc=mbox->permanent_receiver.get(); - other_comm->ref(); mbox->done_comm_queue.push_back(other_comm); XBT_DEBUG("pushing a message into the permanent receive list %p, comm %p", mbox, other_comm); }else{ - mbox->push(this_comm); + mbox->push(other_comm); } } else { XBT_DEBUG("Receive already pushed"); - this_comm->unref(); - this_comm->unref(); other_comm->state = SIMIX_READY; other_comm->type = SIMIX_COMM_READY; @@ -194,7 +187,6 @@ smx_activity_t SIMIX_comm_irecv(smx_actor_t dst_proc, smx_mailbox_t mbox, void * //communication already done, get it inside the list of completed comms if (mbox->permanent_receiver != nullptr && not mbox->done_comm_queue.empty()) { - this_synchro->unref(); XBT_DEBUG("We have a comm that has probably already been received, trying to match it, to skip the communication"); //find a match in the list of already received comms other_comm = _find_matching_comm(&mbox->done_comm_queue, SIMIX_COMM_SEND, match_fun, data, this_synchro, @@ -210,10 +202,7 @@ smx_activity_t SIMIX_comm_irecv(smx_actor_t dst_proc, smx_mailbox_t mbox, void * other_comm->state = SIMIX_DONE; other_comm->type = SIMIX_COMM_DONE; other_comm->mbox = nullptr; - other_comm->unref(); } - other_comm->unref(); - this_synchro->unref(); } } else { /* Prepare a comm describing us, so that it gets passed to the user-provided filter of other side */ @@ -234,8 +223,6 @@ smx_activity_t SIMIX_comm_irecv(smx_actor_t dst_proc, smx_mailbox_t mbox, void * other_comm->state = SIMIX_READY; other_comm->type = SIMIX_COMM_READY; - this_synchro->unref(); - this_synchro->unref(); } dst_proc->comms.push_back(other_comm); } @@ -272,13 +259,13 @@ smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int t int tag, int (*match_fun)(void *, void *, smx_activity_t), void *data) { XBT_DEBUG("iprobe from %p %p", mbox, &mbox->comm_queue); - simgrid::kernel::activity::CommImpl* this_comm; + simgrid::kernel::activity::CommImplPtr this_comm; int smx_type; if(type == 1){ - this_comm = new simgrid::kernel::activity::CommImpl(SIMIX_COMM_SEND); + this_comm = simgrid::kernel::activity::CommImplPtr(new simgrid::kernel::activity::CommImpl(SIMIX_COMM_SEND)); smx_type = SIMIX_COMM_RECEIVE; } else{ - this_comm = new simgrid::kernel::activity::CommImpl(SIMIX_COMM_RECEIVE); + this_comm = simgrid::kernel::activity::CommImplPtr(new simgrid::kernel::activity::CommImpl(SIMIX_COMM_RECEIVE)); smx_type = SIMIX_COMM_SEND; } smx_activity_t other_synchro=nullptr; @@ -293,10 +280,6 @@ smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int t (e_smx_comm_type_t) smx_type, match_fun, data, this_comm,/*remove_matching*/false); } - if(other_synchro) - other_synchro->unref(); - - this_comm->unref(); return other_synchro; } -- 2.20.1