X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f3b7e5f4b4d7c87ee3e8827313ec966ea8fc8387..cd64137e40f8a77c3bb8386b4819acd6750a334f:/src/simix/libsmx.cpp diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 3f407470c7..2a0f56461f 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -62,12 +62,12 @@ unsigned int simcall_execution_waitany_for(simgrid::kernel::activity::ExecImpl* return simcall_BODY_execution_waitany_for(execs, count, timeout); } -void simcall_process_join(smx_actor_t process, double timeout) // XBT_DEPRECATED_v328 +void simcall_process_join(smx_actor_t process, double timeout) // XBT_ATTRIB_DEPRECATED_v328 { simgrid::kernel::actor::ActorImpl::self()->join(process, timeout); } -void simcall_process_suspend(smx_actor_t process) // XBT_DEPRECATED_v328 +void simcall_process_suspend(smx_actor_t process) // XBT_ATTRIB_DEPRECATED_v328 { process->get_iface()->suspend(); } @@ -184,11 +184,11 @@ simcall_comm_iprobe(smx_mailbox_t mbox, int type, bool (*match_fun)(void*, void* unsigned int simcall_comm_waitany(simgrid::kernel::activity::ActivityImplPtr comms[], size_t count, double timeout) // XBT_ATTRIB_DEPRECATED_v330 { - auto rcomms = std::make_unique(count); - std::transform(comms, comms + count, rcomms.get(), [](const simgrid::kernel::activity::ActivityImplPtr& comm) { + std::vector rcomms(count); + std::transform(comms, comms + count, begin(rcomms), [](const simgrid::kernel::activity::ActivityImplPtr& comm) { return static_cast(comm.get()); }); - return simcall_BODY_comm_waitany(rcomms.get(), count, timeout); + return simcall_BODY_comm_waitany(rcomms.data(), rcomms.size(), timeout); } unsigned int simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_t count, double timeout) @@ -203,11 +203,11 @@ int simcall_comm_testany(simgrid::kernel::activity::ActivityImplPtr comms[], siz { if (count == 0) return -1; - auto rcomms = std::make_unique(count); - std::transform(comms, comms + count, rcomms.get(), [](const simgrid::kernel::activity::ActivityImplPtr& comm) { + std::vector rcomms(count); + std::transform(comms, comms + count, begin(rcomms), [](const simgrid::kernel::activity::ActivityImplPtr& comm) { return static_cast(comm.get()); }); - return simcall_BODY_comm_testany(rcomms.get(), count); + return simcall_BODY_comm_testany(rcomms.data(), rcomms.size()); } int simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_t count) @@ -368,8 +368,9 @@ int simcall_mc_random(int min, int max) { /* ************************************************************************** */ /** @brief returns a printable string representing a simcall */ -const char *SIMIX_simcall_name(e_smx_simcall_t kind) { - return simcall_names[kind]; +const char* SIMIX_simcall_name(Simcall kind) +{ + return simcall_names[static_cast(kind)]; } namespace simgrid {