#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "src/simix/smx_host_private.hpp"
#include "src/simix/smx_io_private.hpp"
+#include "src/simix/smx_network_private.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
{
xbt_assert(mbox, "No rendez-vous point defined for iprobe");
- return simcall_BODY_comm_iprobe(mbox, type, match_fun, data);
+ return simgrid::simix::simcall(
+ [mbox, type, match_fun, data] { return SIMIX_comm_iprobe(mbox, type, match_fun, data); });
}
/**
simgrid::simix::marshal<int>(simcall->result, result);
}
-static inline smx_mailbox_t simcall_comm_iprobe__get__mbox(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[0]);
-}
-static inline smx_mailbox_t simcall_comm_iprobe__getraw__mbox(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<smx_mailbox_t>(simcall->args[0]);
-}
-static inline void simcall_comm_iprobe__set__mbox(smx_simcall_t simcall, smx_mailbox_t arg)
-{
- simgrid::simix::marshal<smx_mailbox_t>(simcall->args[0], arg);
-}
-static inline int simcall_comm_iprobe__get__type(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<int>(simcall->args[1]);
-}
-static inline int simcall_comm_iprobe__getraw__type(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<int>(simcall->args[1]);
-}
-static inline void simcall_comm_iprobe__set__type(smx_simcall_t simcall, int arg)
-{
- simgrid::simix::marshal<int>(simcall->args[1], arg);
-}
-static inline simix_match_func_t simcall_comm_iprobe__get__match_fun(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[2]);
-}
-static inline simix_match_func_t simcall_comm_iprobe__getraw__match_fun(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<simix_match_func_t>(simcall->args[2]);
-}
-static inline void simcall_comm_iprobe__set__match_fun(smx_simcall_t simcall, simix_match_func_t arg)
-{
- simgrid::simix::marshal<simix_match_func_t>(simcall->args[2], arg);
-}
-static inline void* simcall_comm_iprobe__get__data(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<void*>(simcall->args[3]);
-}
-static inline void* simcall_comm_iprobe__getraw__data(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<void*>(simcall->args[3]);
-}
-static inline void simcall_comm_iprobe__set__data(smx_simcall_t simcall, void* arg)
-{
- simgrid::simix::marshal<void*>(simcall->args[3], arg);
-}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_comm_iprobe__get__result(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result);
-}
-static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_iprobe__getraw__result(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->result);
-}
-static inline void simcall_comm_iprobe__set__result(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> result)
-{
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, result);
-}
-
static inline smx_actor_t simcall_comm_send__get__sender(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
XBT_PRIVATE void
simcall_HANDLER_execution_test(smx_simcall_t simcall,
boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution);
-XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, 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 boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> 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);
return simcall<int, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(SIMCALL_EXECUTION_TEST, execution);
}
-inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, simix_match_func_t match_fun, void* data)
-{
- if (0) /* Go to that function to follow the code flow through the simcall barrier */
- simcall_HANDLER_comm_iprobe(&SIMIX_process_self()->simcall, mbox, type, match_fun, data);
- return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_mailbox_t, int, simix_match_func_t, void*>(SIMCALL_COMM_IPROBE, mbox, type, 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)
{
if (0) /* Go to that function to follow the code flow through the simcall barrier */
SIMCALL_PROCESS_SLEEP,
SIMCALL_EXECUTION_WAIT,
SIMCALL_EXECUTION_TEST,
- SIMCALL_COMM_IPROBE,
SIMCALL_COMM_SEND,
SIMCALL_COMM_ISEND,
SIMCALL_COMM_RECV,
/** @brief Simcalls' names (generated from src/simix/simcalls.in) */
const char* simcall_names[] = {
- "SIMCALL_NONE", "SIMCALL_PROCESS_SUSPEND", "SIMCALL_PROCESS_JOIN", "SIMCALL_PROCESS_SLEEP",
- "SIMCALL_EXECUTION_WAIT", "SIMCALL_EXECUTION_TEST", "SIMCALL_COMM_IPROBE", "SIMCALL_COMM_SEND",
- "SIMCALL_COMM_ISEND", "SIMCALL_COMM_RECV", "SIMCALL_COMM_IRECV", "SIMCALL_COMM_WAITANY",
- "SIMCALL_COMM_WAIT", "SIMCALL_COMM_TEST", "SIMCALL_COMM_TESTANY", "SIMCALL_MUTEX_LOCK",
- "SIMCALL_MUTEX_TRYLOCK", "SIMCALL_MUTEX_UNLOCK", "SIMCALL_COND_WAIT", "SIMCALL_COND_WAIT_TIMEOUT",
- "SIMCALL_SEM_ACQUIRE", "SIMCALL_SEM_ACQUIRE_TIMEOUT", "SIMCALL_IO_WAIT", "SIMCALL_MC_RANDOM",
- "SIMCALL_RUN_KERNEL", "SIMCALL_RUN_BLOCKING",
+ "SIMCALL_NONE",
+ "SIMCALL_PROCESS_SUSPEND",
+ "SIMCALL_PROCESS_JOIN",
+ "SIMCALL_PROCESS_SLEEP",
+ "SIMCALL_EXECUTION_WAIT",
+ "SIMCALL_EXECUTION_TEST",
+ "SIMCALL_COMM_SEND",
+ "SIMCALL_COMM_ISEND",
+ "SIMCALL_COMM_RECV",
+ "SIMCALL_COMM_IRECV",
+ "SIMCALL_COMM_WAITANY",
+ "SIMCALL_COMM_WAIT",
+ "SIMCALL_COMM_TEST",
+ "SIMCALL_COMM_TESTANY",
+ "SIMCALL_MUTEX_LOCK",
+ "SIMCALL_MUTEX_TRYLOCK",
+ "SIMCALL_MUTEX_UNLOCK",
+ "SIMCALL_COND_WAIT",
+ "SIMCALL_COND_WAIT_TIMEOUT",
+ "SIMCALL_SEM_ACQUIRE",
+ "SIMCALL_SEM_ACQUIRE_TIMEOUT",
+ "SIMCALL_IO_WAIT",
+ "SIMCALL_MC_RANDOM",
+ "SIMCALL_RUN_KERNEL",
+ "SIMCALL_RUN_BLOCKING",
};
/** @private
simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]));
break;
-case SIMCALL_COMM_IPROBE:
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, simcall_HANDLER_comm_iprobe(simcall, simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[2]), simgrid::simix::unmarshal<void*>(simcall->args[3])));
- SIMIX_simcall_answer(simcall);
- break;
-
case SIMCALL_COMM_SEND:
simcall_HANDLER_comm_send(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]), simgrid::simix::unmarshal<double>(simcall->args[3]), simgrid::simix::unmarshal<void*>(simcall->args[4]), simgrid::simix::unmarshal<size_t>(simcall->args[5]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[7]), simgrid::simix::unmarshal<void*>(simcall->args[8]), simgrid::simix::unmarshal<double>(simcall->args[9]));
break;
int execution_wait(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution) [[block]];
int execution_test(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> execution) [[block]];
-boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_iprobe(smx_mailbox_t mbox, int type, 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]];
boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> 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]];
return other_comm;
}
-smx_activity_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type,
- simix_match_func_t match_fun, void* data)
-{
- return SIMIX_comm_iprobe(simcall->issuer, mbox, type, match_fun, data);
-}
-
-smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int type, simix_match_func_t match_fun,
- void* data)
+smx_activity_t SIMIX_comm_iprobe(smx_mailbox_t mbox, int type, simix_match_func_t match_fun, void* data)
{
XBT_DEBUG("iprobe from %p %p", mbox, &mbox->comm_queue_);
simgrid::kernel::activity::CommImplPtr this_comm;
int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data,
double rate);
-XBT_PRIVATE smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int type,
- simix_match_func_t match_fun, void* data);
+XBT_PRIVATE smx_activity_t SIMIX_comm_iprobe(smx_mailbox_t mbox, int type, simix_match_func_t match_fun, void* data);
#endif