void SIMIX_pre_host_execution_wait(u_smx_scalar_t *args)
{
- smx_action_t action = args[0].p;
+ smx_simcall_t simcall = args[0].p;
+ smx_action_t action = args[1].p;
XBT_DEBUG("Wait for execution of action %p, state %d", action, (int)action->state);
double SIMIX_host_get_speed(u_smx_scalar_t *args);
double SIMIX_host_get_available_speed(u_smx_scalar_t *args);
int SIMIX_host_get_state(u_smx_scalar_t *args);
-smx_action_t SIMIX_host_execute(smx_process_t issuer, u_smx_scalar_t *args);
+smx_action_t SIMIX_host_execute(u_smx_scalar_t *args);
smx_action_t SIMIX_host_parallel_execute(u_smx_scalar_t *args);
void SIMIX_host_execution_destroy(u_smx_scalar_t *args);
void SIMIX_host_execution_cancel(u_smx_scalar_t *args);
break;
case SIMCALL_HOST_SET_DATA:
- SIMIX_host_set_data(simcall->host_set_data.host, simcall->host_set_data.data);
+ SIMIX_host_set_data(SIMIX_pack_args(PTR(simcall->host_set_data.host), PTR(simcall->host_set_data.data)));
SIMIX_simcall_answer(simcall);
break;
/* New Simcal interface */
/* FIXME: add types for every simcall */
-const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p" };
+const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p", [SIMCALL_HOST_EXECUTION_WAIT] = "%p%p" };
+
simcall_handler_t simcall_table[NUM_SIMCALLS] = {
#undef SIMCALL_ENUM_ELEMENT
struct {
smx_action_t execution;
+ struct s_smx_simcall *simcall;
e_smx_state_t result;
+
} host_execution_wait;
struct {
simcall->call = SIMCALL_HOST_EXECUTION_WAIT;
simcall->host_execution_wait.execution = execution;
+ simcall->host_execution_wait.simcall = simcall;
+
+ SIMIX_simcall(SIMCALL_HOST_EXECUTION_WAIT, PTR(simcall), PTR(execution));
+
if(MC_is_active()) /* Initialize result to a default value for snapshot comparison done during simcall */
simcall->host_execution_wait.result = -1;
- SIMIX_simcall_push(simcall->issuer);
+
return simcall->host_execution_wait.result;
}