int (*match_fun)(void *, void *, smx_action_t),
void *data, double rate);
-XBT_PUBLIC(void) simcall_comm_destroy(smx_action_t comm);
XBT_PUBLIC(smx_action_t) simcall_comm_iprobe(smx_rdv_t rdv, int src, int tag,
int (*match_fun)(void *, void *, smx_action_t), void *data);
XBT_PUBLIC(void) simcall_comm_cancel(smx_action_t comm);
comm_isend True (void*, smx_action_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (clean_fun, FPtr, simix_clean_func_t) (data, void*) (detached, int)
comm_recv False (void) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (data, void*) (timeout, double) (rate, double)
comm_irecv True (void*, smx_action_t) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (data, void*) (rate, double)
-comm_destroy True (void) (comm, void*, smx_action_t)
comm_cancel True (void) (comm, void*, smx_action_t)
comm_waitany False (int) (comms, void*, xbt_dynar_t)
comm_wait False (void) (comm, void*, smx_action_t) (timeout, double)
static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double arg){
simcall->args[5].d = arg;
}
-static inline smx_action_t simcall_comm_destroy__get__comm(smx_simcall_t simcall){
- return (smx_action_t) simcall->args[0].dp;
-}
-static inline void simcall_comm_destroy__set__comm(smx_simcall_t simcall, void* arg){
- simcall->args[0].dp = arg;
-}
static inline smx_action_t simcall_comm_cancel__get__comm(smx_simcall_t simcall){
return (smx_action_t) simcall->args[0].dp;
}
}
return self->simcall.result.dp;
}
- inline static void simcall_BODY_comm_destroy(smx_action_t comm) {
- smx_process_t self = SIMIX_process_self();
- self->simcall.call = SIMCALL_COMM_DESTROY;
- memset(&self->simcall.result, 0, sizeof(self->simcall.result));
- memset(self->simcall.args, 0, sizeof(self->simcall.args));
- self->simcall.args[0].dp = (void*) comm;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_pre(&self->simcall, 0);
- }
-
- }
inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
smx_process_t self = SIMIX_process_self();
self->simcall.call = SIMCALL_COMM_CANCEL;
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_COMM_DESTROY:
- SIMIX_pre_comm_destroy(simcall , (smx_action_t) simcall->args[0].dp);
- SIMIX_simcall_answer(simcall);
- break;
-
case SIMCALL_COMM_CANCEL:
SIMIX_pre_comm_cancel(simcall , (smx_action_t) simcall->args[0].dp);
SIMIX_simcall_answer(simcall);
SIMCALL_COMM_ISEND,
SIMCALL_COMM_RECV,
SIMCALL_COMM_IRECV,
-SIMCALL_COMM_DESTROY,
SIMCALL_COMM_CANCEL,
SIMCALL_COMM_WAITANY,
SIMCALL_COMM_WAIT,
}
-
-
static inline int simcall_comm_waitany__get__result(smx_simcall_t simcall){
return simcall->result.i;
}
[SIMCALL_COMM_ISEND] = "SIMCALL_COMM_ISEND",
[SIMCALL_COMM_RECV] = "SIMCALL_COMM_RECV",
[SIMCALL_COMM_IRECV] = "SIMCALL_COMM_IRECV",
-[SIMCALL_COMM_DESTROY] = "SIMCALL_COMM_DESTROY",
[SIMCALL_COMM_CANCEL] = "SIMCALL_COMM_CANCEL",
[SIMCALL_COMM_WAITANY] = "SIMCALL_COMM_WAITANY",
[SIMCALL_COMM_WAIT] = "SIMCALL_COMM_WAIT",
return act;
}
-void SIMIX_pre_comm_destroy(smx_simcall_t simcall, smx_action_t action){
- SIMIX_comm_destroy(action);
-}
/**
* \brief Destroy a communicate action
* \param action The communicate action to be destroyed
* \brief verify if communication is latency bounded
* \param comm The communication
*/
-XBT_INLINE int SIMIX_comm_is_latency_bounded(smx_action_t action)
+int SIMIX_comm_is_latency_bounded(smx_action_t action)
{
if(!action){
return 0;
void SIMIX_network_exit(void);
#ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_INLINE XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_action_t comm);
+XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_action_t comm);
#endif
smx_rdv_t SIMIX_rdv_create(const char *name);
void *dst_buff, size_t *dst_buff_size,
int (*match_fun)(void *, void *, smx_action_t),
void *data, double rate);
-void SIMIX_pre_comm_destroy(smx_simcall_t simcall, smx_action_t action);
void SIMIX_pre_comm_cancel(smx_simcall_t simcall, smx_action_t action);
double SIMIX_pre_comm_get_remains(smx_simcall_t simcall, smx_action_t action);
e_smx_state_t SIMIX_pre_comm_get_state(smx_simcall_t simcall, smx_action_t action);
* skipping the simcall (for now). It works in parallel, it won't work on
* distributed but probably we will change MSG for that. */
- /*
- smx_simcall_t simcall = simcall_mine();
- simcall->call = SIMCALL_RDV_GEY_BY_NAME;
- simcall->rdv_get_by_name.name = name;
- SIMIX_simcall_push(simcall->issuer);
- return simcall->rdv_get_by_name.result;*/
-
return SIMIX_rdv_get_by_name(name);
}
return simcall_BODY_comm_iprobe(rdv, src, tag, match_fun, data);
}
-void simcall_comm_destroy(smx_action_t comm)
-{
- xbt_assert(comm, "Invalid parameter");
-
- /* FIXME remove this simcall type: comms are auto-destroyed now */
-
- /*
- smx_simcall_t simcall = simcall_mine();
-
- simcall->call = SIMCALL_COMM_DESTROY;
- simcall->comm_destroy.comm = comm;
-
- SIMIX_simcall_push(simcall->issuer);
- */
-}
-
/**
* \ingroup simix_comm_management
*/