Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill dead code
[simgrid.git] / src / simix / smx_smurf.c
index 77623e7..49f3745 100644 (file)
@@ -34,7 +34,7 @@ void SIMIX_simcall_push(smx_process_t self)
     SIMIX_process_yield(self);
   } else {
     XBT_DEBUG("I'm the maestro, execute the simcall directly");
-    SIMIX_simcall_pre(&self->simcall, 0);
+    SIMIX_simcall_enter(&self->simcall, 0);
   }
 }
 
@@ -53,33 +53,7 @@ void SIMIX_simcall_answer(smx_simcall_t simcall)
   }
 }
 
-void SIMIX_simcall_pre(smx_simcall_t simcall, int value)
-{
-  XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
-  simcall->mc_value = value;
-  if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)
-    return;
-  switch (simcall->call) {
-#include "simcalls_generated_case.c"
-    case NUM_SIMCALLS:;
-      break;
-    case SIMCALL_NONE:;
-      THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
-          SIMIX_process_get_name(simcall->issuer),
-          SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer))
-          );
-      break;
-
-    /* ****************************************************************************************** */
-    /* TUTORIAL: New API                                                                        */
-    /* ****************************************************************************************** */
-    case SIMCALL_NEW_API_INIT:
-      SIMIX_pre_new_api_fct(simcall);
-      break;
-  }
-}
-
-void SIMIX_simcall_post(smx_action_t action)
+void SIMIX_simcall_exit(smx_action_t action)
 {
   switch (action->type) {
 
@@ -96,6 +70,10 @@ void SIMIX_simcall_post(smx_action_t action)
       SIMIX_post_process_sleep(action);
       break;
 
+    case SIMIX_ACTION_JOIN:
+      SIMIX_post_process_sleep(action);
+      break;
+
     case SIMIX_ACTION_SYNCHRO:
       SIMIX_post_synchro(action);
       break;
@@ -112,30 +90,3 @@ void SIMIX_simcall_post(smx_action_t action)
       break;
   }
 }
-
-/* New Simcal interface */
-
-/* FIXME: add types for every simcall */
-//const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p" };
-/* FIXME find a way to make this work
-simcall_handler_t simcall_table[NUM_SIMCALLS] = {
-#undef SIMCALL_ENUM_ELEMENT
-#define SIMCALL_ENUM_ELEMENT(x,y) &y // generate strings from the enumeration values 
-SIMCALL_LIST
-#undef SIMCALL_ENUM_ELEMENT
-};*/
-
-/* New Simcal interface */
-
-/* FIXME: add types for every simcall */
-//const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p", [SIMCALL_HOST_EXECUTION_WAIT] = "%p%p" };
-
-
-/*TOFIX find a way to make this work
-simcall_handler_t simcall_table[NUM_SIMCALLS] = {
-#undef SIMCALL_ENUM_ELEMENT
-#define SIMCALL_ENUM_ELEMENT(x,y) &y // generate strings from the enumeration values
-SIMCALL_LIST
-#undef SIMCALL_ENUM_ELEMENT
-};*/
-