/* Getters and setters */
XBT_PUBLIC(double) simcall_comm_get_remains(smx_synchro_t comm);
-XBT_PUBLIC(e_smx_state_t) simcall_comm_get_state(smx_synchro_t comm);
XBT_PUBLIC(void *) simcall_comm_get_src_data(smx_synchro_t comm);
XBT_PUBLIC(void *) simcall_comm_get_dst_data(smx_synchro_t comm);
XBT_PUBLIC(smx_process_t) simcall_comm_get_src_proc(smx_synchro_t comm);
return simcall_BODY_comm_get_remains(comm);
}
-/**
- * \ingroup simix_comm_management
- *
- */
-e_smx_state_t simcall_comm_get_state(smx_synchro_t comm)
-{
- return simcall_BODY_comm_get_state(comm);
-}
-
/**
* \ingroup simix_comm_management
*
simcall->result.d = result;
}
-static inline smx_synchro_t simcall_comm_get_state__get__comm(smx_simcall_t simcall) {
- return (smx_synchro_t) simcall->args[0].dp;
-}
-static inline void simcall_comm_get_state__set__comm(smx_simcall_t simcall, void* arg) {
- simcall->args[0].dp = arg;
-}
-static inline e_smx_state_t simcall_comm_get_state__get__result(smx_simcall_t simcall){
- return (e_smx_state_t) simcall->result.i;
-}
-static inline void simcall_comm_get_state__set__result(smx_simcall_t simcall, int result){
- simcall->result.i = result;
-}
-
static inline smx_synchro_t simcall_comm_get_src_data__get__comm(smx_simcall_t simcall) {
return (smx_synchro_t) simcall->args[0].dp;
}
return (double) self->simcall.result.d;
}
-inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) {
- smx_process_t self = SIMIX_process_self();
-
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) SIMIX_comm_get_state(comm);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_COMM_GET_STATE;
- 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_handle(&self->simcall, 0);
- }
- return (e_smx_state_t) self->simcall.result.i;
- }
-
inline static void* simcall_BODY_comm_get_src_data(smx_synchro_t comm) {
smx_process_t self = SIMIX_process_self();
SIMCALL_COMM_TEST,
SIMCALL_COMM_TESTANY,
SIMCALL_COMM_GET_REMAINS,
- SIMCALL_COMM_GET_STATE,
SIMCALL_COMM_GET_SRC_DATA,
SIMCALL_COMM_GET_DST_DATA,
SIMCALL_COMM_GET_SRC_PROC,
"SIMCALL_COMM_TEST",
"SIMCALL_COMM_TESTANY",
"SIMCALL_COMM_GET_REMAINS",
- "SIMCALL_COMM_GET_STATE",
"SIMCALL_COMM_GET_SRC_DATA",
"SIMCALL_COMM_GET_DST_DATA",
"SIMCALL_COMM_GET_SRC_PROC",
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_COMM_GET_STATE:
- simcall->result.i = SIMIX_comm_get_state((smx_synchro_t) simcall->args[0].dp);
- SIMIX_simcall_answer(simcall);
- break;
-
case SIMCALL_COMM_GET_SRC_DATA:
simcall->result.dp = SIMIX_comm_get_src_data((smx_synchro_t) simcall->args[0].dp);
SIMIX_simcall_answer(simcall);
Blck H comm_test (int) (comm, void*, smx_synchro_t)
Blck H comm_testany (int) (comms, void*, xbt_dynar_t)
Func - comm_get_remains (double) (comm, void*, smx_synchro_t)
-Func - comm_get_state (int, e_smx_state_t) (comm, void*, smx_synchro_t)
Func - comm_get_src_data (void*) (comm, void*, smx_synchro_t)
Func - comm_get_dst_data (void*) (comm, void*, smx_synchro_t)
Func - comm_get_src_proc (void*, smx_process_t) (comm, void*, smx_synchro_t)