Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make SimGrid compile again :)
authorCristian Rosa <cristian@rtfm.org.ar>
Wed, 10 Oct 2012 14:54:56 +0000 (11:54 -0300)
committershenshei <paul.bedaride@gmail.com>
Wed, 28 Nov 2012 08:19:07 +0000 (09:19 +0100)
src/simix/smx_host.c
src/simix/smx_host_private.h
src/simix/smx_smurf.c
src/simix/smx_smurf_private.h
src/simix/smx_user.c

index 1984381..c3c6546 100644 (file)
@@ -419,7 +419,8 @@ void SIMIX_host_execution_set_priority(u_smx_scalar_t *args)
 
 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);
 
index 9a0ec79..1399100 100644 (file)
@@ -38,7 +38,7 @@ xbt_dict_t SIMIX_host_get_properties(u_smx_scalar_t *args);
 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);
index 4471f16..366897a 100644 (file)
@@ -267,7 +267,7 @@ void SIMIX_simcall_pre(smx_simcall_t simcall, int value)
       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;
 
@@ -647,7 +647,8 @@ void __SIMIX_simcall(e_smx_simcall_t simcall_id, u_smx_scalar_t *args)
 /* 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
index 6d3d645..61b606c 100644 (file)
@@ -242,7 +242,9 @@ typedef struct s_smx_simcall {
 
     struct {
       smx_action_t execution;
+      struct s_smx_simcall *simcall;
       e_smx_state_t result;
+
     } host_execution_wait;
 
     struct {
index d019078..3331b46 100644 (file)
@@ -383,9 +383,13 @@ e_smx_state_t simcall_host_execution_wait(smx_action_t execution)
 
   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;
 }