Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ensure that the generated files are autonomous and not included within another file
[simgrid.git] / src / simix / simcalls_generated_case.c
index 57e9938..dd2f3cf 100644 (file)
@@ -5,7 +5,22 @@
  * in src/simix/simcalls.in                  *
  *********************************************/
 
-case SIMCALL_HOST_GET_BY_NAME:
+
+#include "smx_private.h"
+#ifdef HAVE_MC
+#include "mc/mc_private.h"
+#endif
+
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_smurf);
+
+void SIMIX_simcall_pre(smx_simcall_t simcall, int value)
+{
+  XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
+  SIMCALL_SET_MC_VALUE(simcall, value);
+  if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)
+    return;
+  switch (simcall->call) {
+  case SIMCALL_HOST_GET_BY_NAME:
       simcall->result.dp = SIMIX_pre_host_get_by_name(simcall ,  simcall->args[0].cc);
       SIMIX_simcall_answer(simcall);
       break;  
@@ -609,3 +624,22 @@ case SIMCALL_MC_RANDOM:
       break;  
 
 #endif
+
+    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;
+  }
+}
+  
\ No newline at end of file