Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to simplify the way simcalls are generated
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 11 Oct 2014 22:17:13 +0000 (00:17 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 11 Oct 2014 22:17:13 +0000 (00:17 +0200)
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/MaintainerMode.cmake
src/simix/simcalls.py
src/simix/simcalls_generated_args_getter_setter.h
src/simix/simcalls_generated_body.c
src/simix/simcalls_generated_enum.h
src/simix/simcalls_generated_res_getter_setter.h
src/simix/simcalls_generated_string.c [deleted file]
src/simix/smx_popping_generated.c [moved from src/simix/smx_simcall_enter.c with 75% similarity]
src/simix/smx_smurf_private.h
src/simix/smx_user.c

index 8cd8172..87a15f5 100644 (file)
@@ -31,10 +31,9 @@ set(EXTRA_DIST
   src/simix/simcalls.py
   src/simix/simcalls_generated_args_getter_setter.h
   src/simix/simcalls_generated_body.c
-  src/simix/smx_simcall_enter.c
+  src/simix/smx_popping_generated.c
   src/simix/simcalls_generated_enum.h
   src/simix/simcalls_generated_res_getter_setter.h
-  src/simix/simcalls_generated_string.c
   src/simix/smx_host_private.h
   src/simix/smx_io_private.h
   src/simix/smx_network_private.h
@@ -361,7 +360,7 @@ set(SURF_SRC
   )
 
 set(SIMIX_GENERATED_SRC
-  src/simix/smx_simcall_enter.c
+  src/simix/smx_popping_generated.c
   )
 set(SIMIX_SRC
   src/simix/smx_context.c
index 66f0190..81f785c 100644 (file)
@@ -11,10 +11,9 @@ if(enable_maintainer_mode AND NOT WIN32)
     add_custom_command(
       OUTPUT
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_enum.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_string.c
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_res_getter_setter.h
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_args_getter_setter.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/smx_simcall_enter.c
+      ${CMAKE_HOME_DIRECTORY}/src/simix/smx_popping_generated.c
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_body.c
       
       DEPENDS
@@ -29,15 +28,14 @@ if(enable_maintainer_mode AND NOT WIN32)
     add_custom_target(simcalls_generated_src
       DEPENDS
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_enum.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_string.c
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_res_getter_setter.h
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_args_getter_setter.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/smx_simcall_enter.c
+      ${CMAKE_HOME_DIRECTORY}/src/simix/smx_popping_generated.c
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_body.c
       )
 
     SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
-      "${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_enum.h;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_string.c;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_res_getter_setter.h;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_args_getter_setter.h;${CMAKE_HOME_DIRECTORY}/src/simix/smx_simcall_enter.c;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_body.c"
+      "${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_enum.h;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_res_getter_setter.h;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_args_getter_setter.h;${CMAKE_HOME_DIRECTORY}/src/simix/smx_popping_generated.c;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_body.c"
       )
   endif()
 endif()
index 0b12f49..19da031 100755 (executable)
@@ -1,8 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-# Copyright (c) 2014. The SimGrid Team.
-# All rights reserved.
+# Copyright (c) 2014. The SimGrid Team. All rights reserved.
 
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
@@ -62,14 +61,14 @@ class Simcall(object):
     self.check_pre()
 
   def check_body(self):
-    if self.simcalls_BODY is None:
-      f = open('smx_user.c')
-      self.simcalls_BODY = set(re.findall('simcall_BODY_(.*?)\(', f.read()))
-      f.close()
-    if self.name not in self.simcalls_BODY:
-      print '# ERROR: No function calling simcall_BODY_%s'%self.name
-      print '# Add something like this to smx_user.c:'
-      print '''%s simcall_%s(%s)
+      if self.simcalls_BODY is None:
+          f = open('smx_user.c')
+          self.simcalls_BODY = set(re.findall('simcall_BODY_(.*?)\(', f.read()))
+          f.close()
+      if self.name not in self.simcalls_BODY:
+          print '# ERROR: No function calling simcall_BODY_%s'%self.name
+          print '# Add something like this to smx_user.c:'
+          print '''%s simcall_%s(%s)
 {
   return simcall_BODY_%s(%s);
 }\n'''%(self.res.ret()
@@ -78,8 +77,8 @@ class Simcall(object):
                   for arg in self.args)
      ,self.name
      ,', '.join(arg.name for arg in self.args))
-      return False
-    return True
+          return False
+      return True
 
   def check_pre(self):
     if self.simcalls_PRE is None:
@@ -151,7 +150,8 @@ class Simcall(object):
      'SIMIX_simcall_answer(simcall);\n      ' if self.has_answer else ' ')
 
   def body(self):
-    return '''  inline static %s simcall_BODY_%s(%s) {
+    return '''  
+inline static %s simcall_BODY_%s(%s) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -182,13 +182,13 @@ class Simcall(object):
        ,'' if self.res.type == 'void' else 'return self->simcall.result.%s;'%self.res.field())
 
 def parse(fn):
-  res = []
+  simcalls = []
   resdi = None
-  resd = {}
+  simcalls_guarded = {}
   for line in open(fn).read().split('\n'):
     if line.startswith('##'):
       resdi = []
-      resd[re.search(r'## *(.*)', line).group(1)] = resdi
+      simcalls_guarded[re.search(r'## *(.*)', line).group(1)] = resdi
     if line.startswith('#') or not line:
       continue
     match = re.match(r'(\S*?) *(\S*?) *\((.*?)(?:, *(.*?))?\) *(.*)', line)
@@ -199,25 +199,34 @@ def parse(fn):
       sargs.append(Arg(n,t,c))
     sim = Simcall(name, Arg('result', rest, resc), sargs, ans == 'True')
     if resdi is None:
-      res.append(sim)
+      simcalls.append(sim)
     else:
       resdi.append(sim)
-  return res, resd
-
-def write(fn, func, scs, scd,pre="",post=""):
-  f = open(fn, 'w')
-  f.write('/*********************************************\n')
-  f.write(' * File Generated by src/simix/simcalls.py   *\n')
-  f.write(' *                from src/simix/simcalls.in *\n')
-  f.write(' * Do not modify this file, add new simcalls *\n')
-  f.write(' * in src/simix/simcalls.in                  *\n')  
-  f.write(' *********************************************/\n\n')
-  f.write(pre)
-  f.write('\n'.join(func(sc) for sc in scs))
-  for k, v in scd.items():
-    f.write('\n#ifdef %s\n%s\n#endif\n'%(k, '\n'.join(func(sc) for sc in v)))
-  f.write(post)
-  f.close()
+  return simcalls, simcalls_guarded
+
+def header(fd):
+    fd.write('/**********************************************************************/\n')
+    fd.write('/* File Generated by src/simix/simcalls.py from src/simix/simcalls.in */\n')
+    fd.write('/*                                                                    */\n')
+    fd.write('/*                    DO NOT EVER CHANGE THIS FILE                    */\n')
+    fd.write('/*                                                                    */\n')
+    fd.write('/* change simcalls specification in src/simix/simcalls.in             */\n')  
+    fd.write('/**********************************************************************/\n\n')
+
+def handle(fd,func, simcalls, guarded_simcalls):
+    fd.write('\n'.join(func(simcall) for simcall in simcalls))
+    for guard, list in guarded_simcalls.items():
+        fd.write('\n#ifdef %s\n'%(guard))
+        fd.write('\n'.join(func(simcall) for simcall in list))
+        fd.write('\n#endif\n')
+
+def write(fn, func, simcalls, scd,pre="",post=""):
+    fd = open(fn, 'w')
+    header(fd)
+    fd.write(pre)
+    handle(fd, func, simcalls, scd)
+    fd.write(post)
+    fd.close()
 
 if __name__=='__main__':
   import sys
@@ -227,7 +236,9 @@ if __name__=='__main__':
   ok &= all(map(Simcall.check, simcalls))
   for k,v in simcalls_dict.items():
     ok &= all(map(Simcall.check, v))
+  # FIXME: we should not hide it
   #if not ok:
+  #  print ("Some checks fail!")
   #  sys.exit(1)
 
   write('simcalls_generated_enum.h', Simcall.enum, simcalls, simcalls_dict,"""
@@ -242,49 +253,67 @@ NUM_SIMCALLS
 } e_smx_simcall_t;
   """)
   
-  write('simcalls_generated_string.c', Simcall.string, simcalls, simcalls_dict)
   write('simcalls_generated_res_getter_setter.h', Simcall.result_getter_setter, simcalls, simcalls_dict)
   write('simcalls_generated_args_getter_setter.h', Simcall.args_getter_setter, simcalls, simcalls_dict)
   
   
-  write('smx_simcall_enter.c', Simcall.case, simcalls, simcalls_dict,"""
+  
+  fd = open("smx_popping_generated.c", 'w')
+  header(fd)
+  fd.write('/*\n')
+  fd.write(' * Note that the name comes from http://en.wikipedia.org/wiki/Popping \n')
+  fd.write(' * Indeed, the control flow is doing a strange dance in there.\n')
+  fd.write(' *\n')
+  fd.write(' * That\'s not about http://en.wikipedia.org/wiki/Poop, despite the odor :)\n')
+  fd.write(' */\n\n')
+  fd.write('#include "smx_private.h"\n');
+  fd.write('#ifdef HAVE_MC\n');
+  fd.write('#include "mc/mc_private.h"\n');
+  fd.write('#endif\n');
+  fd.write('\n');
+  fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_smurf);\n\n');
+  
+  fd.write('/** @brief Simcalls\' names (generated from src/simix/simcalls.in) */\n')
+  fd.write('const char* simcall_names[] = {\n')
 
-#include "smx_private.h"
-#ifdef HAVE_MC
-#include "mc/mc_private.h"
-#endif
+  handle(fd, Simcall.string, simcalls, simcalls_dict)
 
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_smurf);
+  fd.write('[SIMCALL_NONE] = "NONE"\n')
+  fd.write('};\n\n')
 
-/**
- * @brief unpack the simcall and activate the handler in kernel mode
- */
-void SIMIX_simcall_enter(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 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;
-  }
-}
-  """)
+
+  fd.write('/**\n');
+  fd.write(' * @brief (in kernel mode) unpack the simcall and activate the handler\n');
+  fd.write(' * \n')
+  fd.write(' * This function is generated from src/simix/simcalls.in\n')
+  fd.write(' */\n');
+  fd.write('void SIMIX_simcall_enter(smx_simcall_t simcall, int value) {\n');
+  fd.write('  XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));\n');
+  fd.write('  SIMCALL_SET_MC_VALUE(simcall, value);\n');
+  fd.write('  if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)\n');
+  fd.write('    return;\n');
+  fd.write('  switch (simcall->call) {\n');
+
+  handle(fd, Simcall.case, simcalls, simcalls_dict)
+
+  fd.write('    case NUM_SIMCALLS:\n');
+  fd.write('      break;\n');
+  fd.write('    case SIMCALL_NONE:\n');
+  fd.write('      THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",\n');
+  fd.write('          SIMIX_process_get_name(simcall->issuer),\n');
+  fd.write('          SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer))\n');
+  fd.write('          );\n');
+  fd.write('      break;\n');
+  fd.write('\n');
+  fd.write('    /* ****************************************************************************************** */\n');
+  fd.write('    /* TUTORIAL: New API                                                                        */\n');
+  fd.write('    /* ****************************************************************************************** */\n');
+  fd.write('    case SIMCALL_NEW_API_INIT:\n');
+  fd.write('      SIMIX_pre_new_api_fct(simcall);\n');
+  fd.write('      break;\n');
+  fd.write('  }\n');
+  fd.write('}\n');
   
+  fd.close()
   
   write('simcalls_generated_body.c', Simcall.body, simcalls, simcalls_dict)
index 9a9635e..392ea49 100644 (file)
@@ -1,9 +1,10 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
+/**********************************************************************/
+/* File Generated by src/simix/simcalls.py from src/simix/simcalls.in */
+/*                                                                    */
+/*                    DO NOT EVER CHANGE THIS FILE                    */
+/*                                                                    */
+/* change simcalls specification in src/simix/simcalls.in             */
+/**********************************************************************/
 
 static inline const char* simcall_host_get_by_name__get__name(smx_simcall_t simcall){
   return  simcall->args[0].cc;
index d1e2a6d..8ab78ed 100644 (file)
@@ -1,11 +1,13 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
+/**********************************************************************/
+/* File Generated by src/simix/simcalls.py from src/simix/simcalls.in */
+/*                                                                    */
+/*                    DO NOT EVER CHANGE THIS FILE                    */
+/*                                                                    */
+/* change simcalls specification in src/simix/simcalls.in             */
+/**********************************************************************/
 
-  inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) {
+  
+inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -25,7 +27,8 @@
     }    
     return self->simcall.result.dp;
   }
-  inline static const char* simcall_BODY_host_get_name(smx_host_t host) {
+  
+inline static const char* simcall_BODY_host_get_name(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -45,7 +48,8 @@
     }    
     return self->simcall.result.cc;
   }
-  inline static void simcall_BODY_host_on(smx_host_t host) {
+  
+inline static void simcall_BODY_host_on(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -65,7 +69,8 @@
     }    
     
   }
-  inline static void simcall_BODY_host_off(smx_host_t host) {
+  
+inline static void simcall_BODY_host_off(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -85,7 +90,8 @@
     }    
     
   }
-  inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) {
+  
+inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_host_get_core(smx_host_t host) {
+  
+inline static int simcall_BODY_host_get_core(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) {
+  
+inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static double simcall_BODY_host_get_speed(smx_host_t host) {
+  
+inline static double simcall_BODY_host_get_speed(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.d;
   }
-  inline static double simcall_BODY_host_get_available_speed(smx_host_t host) {
+  
+inline static double simcall_BODY_host_get_available_speed(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.d;
   }
-  inline static int simcall_BODY_host_get_state(smx_host_t host) {
+  
+inline static int simcall_BODY_host_get_state(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) {
+  
+inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.d;
   }
-  inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) {
+  
+inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.d;
   }
-  inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) {
+  
+inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) {
+  
+inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
+  
+inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.d;
   }
-  inline static smx_action_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) {
+  
+inline static smx_action_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_action_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) {
+  
+inline static smx_action_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_host_execution_destroy(smx_action_t execution) {
+  
+inline static void simcall_BODY_host_execution_destroy(smx_action_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_host_execution_cancel(smx_action_t execution) {
+  
+inline static void simcall_BODY_host_execution_cancel(smx_action_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static double simcall_BODY_host_execution_get_remains(smx_action_t execution) {
+  
+inline static double simcall_BODY_host_execution_get_remains(smx_action_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.d;
   }
-  inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) {
+  
+inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_host_execution_set_priority(smx_action_t execution, double priority) {
+  
+inline static void simcall_BODY_host_execution_set_priority(smx_action_t execution, double priority) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, double bound) {
+  
+inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, double bound) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_host_execution_set_affinity(smx_action_t execution, smx_host_t ws, unsigned long mask) {
+  
+inline static void simcall_BODY_host_execution_set_affinity(smx_action_t execution, smx_host_t ws, unsigned long mask) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static int simcall_BODY_host_execution_wait(smx_action_t execution) {
+  
+inline static int simcall_BODY_host_execution_wait(smx_action_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) {
+  
+inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) {
+  
+inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
+  
+inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
+  
+inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
+  
+inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
+  
+inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
+  
+inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
+  
+inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
+  
+inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
+  
+inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_process_create(smx_process_t* process, const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart) {
+  
+inline static void simcall_BODY_process_create(smx_process_t* process, const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_process_kill(smx_process_t process) {
+  
+inline static void simcall_BODY_process_kill(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_process_killall(int reset_pid) {
+  
+inline static void simcall_BODY_process_killall(int reset_pid) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_process_cleanup(smx_process_t process) {
+  
+inline static void simcall_BODY_process_cleanup(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
+  
+inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_process_suspend(smx_process_t process) {
+  
+inline static void simcall_BODY_process_suspend(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_process_resume(smx_process_t process) {
+  
+inline static void simcall_BODY_process_resume(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static int simcall_BODY_process_count() {
+  
+inline static int simcall_BODY_process_count() {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_process_get_PID(smx_process_t process) {
+  
+inline static int simcall_BODY_process_get_PID(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
+  
+inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static void* simcall_BODY_process_get_data(smx_process_t process) {
+  
+inline static void* simcall_BODY_process_get_data(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
+  
+inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
+  
+inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
+  
+inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.cc;
   }
-  inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
+  
+inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
+  
+inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
+  
+inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_process_sleep(double duration) {
+  
+inline static int simcall_BODY_process_sleep(double duration) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
+  
+inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
+  
+inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
+  
+inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
+  
+inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
+  
+inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
+  
+inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.ui;
   }
-  inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
+  
+inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
+  
+inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
+  
+inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
+  
+inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
+  
+inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static smx_action_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
+  
+inline static smx_action_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
+  
+inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
+  
+inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
+  
+inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
+  
+inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) {
+  
+inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static int simcall_BODY_comm_test(smx_action_t comm) {
+  
+inline static int simcall_BODY_comm_test(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
+  
+inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
+  
+inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.d;
   }
-  inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
+  
+inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) {
+  
+inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) {
+  
+inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) {
+  
+inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) {
+  
+inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_mutex_t simcall_BODY_mutex_init() {
+  
+inline static smx_mutex_t simcall_BODY_mutex_init() {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
+  
+inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
+  
+inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
+  
+inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
+  
+inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static smx_cond_t simcall_BODY_cond_init() {
+  
+inline static smx_cond_t simcall_BODY_cond_init() {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
+  
+inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
+  
+inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
+  
+inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
+  
+inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
+  
+inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
+  
+inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
+  
+inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_sem_release(smx_sem_t sem) {
+  
+inline static void simcall_BODY_sem_release(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
+  
+inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
+  
+inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
+  
+inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     
   }
-  inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
+  
+inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) {
+  
+inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.sgsz;
   }
-  inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) {
+  
+inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.sgsz;
   }
-  inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) {
+  
+inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) {
+  
+inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) {
+  
+inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
+  
+inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.sgsz;
   }
-  inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
+  
+inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.sgsz;
   }
-  inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
+  
+inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
+  
+inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
+  
+inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
+  
+inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.sgsz;
   }
-  inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
+  
+inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.sgsz;
   }
-  inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
+  
+inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
+  
+inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
+  
+inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     return self->simcall.result.dp;
   }
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-  inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) {
+  
+inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
 #endif
 
 #ifdef HAVE_TRACING
-  inline static void simcall_BODY_set_category(smx_action_t action, const char* category) {
+  
+inline static void simcall_BODY_set_category(smx_action_t action, const char* category) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
 #endif
 
 #ifdef HAVE_MC
-  inline static void* simcall_BODY_mc_snapshot() {
+  
+inline static void* simcall_BODY_mc_snapshot() {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
+  
+inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_mc_random(int min, int max) {
+  
+inline static int simcall_BODY_mc_random(int min, int max) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
index 597a621..b4663ea 100644 (file)
@@ -1,9 +1,10 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
+/**********************************************************************/
+/* File Generated by src/simix/simcalls.py from src/simix/simcalls.in */
+/*                                                                    */
+/*                    DO NOT EVER CHANGE THIS FILE                    */
+/*                                                                    */
+/* change simcalls specification in src/simix/simcalls.in             */
+/**********************************************************************/
 
 
 /**
index 6afe222..86342fc 100644 (file)
@@ -1,9 +1,10 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
+/**********************************************************************/
+/* File Generated by src/simix/simcalls.py from src/simix/simcalls.in */
+/*                                                                    */
+/*                    DO NOT EVER CHANGE THIS FILE                    */
+/*                                                                    */
+/* change simcalls specification in src/simix/simcalls.in             */
+/**********************************************************************/
 
 static inline smx_host_t simcall_host_get_by_name__get__result(smx_simcall_t simcall){
   return (smx_host_t) simcall->result.dp;
diff --git a/src/simix/simcalls_generated_string.c b/src/simix/simcalls_generated_string.c
deleted file mode 100644 (file)
index 8269d30..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
-
-[SIMCALL_HOST_GET_BY_NAME] = "SIMCALL_HOST_GET_BY_NAME",
-[SIMCALL_HOST_GET_NAME] = "SIMCALL_HOST_GET_NAME",
-[SIMCALL_HOST_ON] = "SIMCALL_HOST_ON",
-[SIMCALL_HOST_OFF] = "SIMCALL_HOST_OFF",
-[SIMCALL_HOST_GET_PROPERTIES] = "SIMCALL_HOST_GET_PROPERTIES",
-[SIMCALL_HOST_GET_CORE] = "SIMCALL_HOST_GET_CORE",
-[SIMCALL_HOST_GET_PROCESS_LIST] = "SIMCALL_HOST_GET_PROCESS_LIST",
-[SIMCALL_HOST_GET_SPEED] = "SIMCALL_HOST_GET_SPEED",
-[SIMCALL_HOST_GET_AVAILABLE_SPEED] = "SIMCALL_HOST_GET_AVAILABLE_SPEED",
-[SIMCALL_HOST_GET_STATE] = "SIMCALL_HOST_GET_STATE",
-[SIMCALL_HOST_GET_CURRENT_POWER_PEAK] = "SIMCALL_HOST_GET_CURRENT_POWER_PEAK",
-[SIMCALL_HOST_GET_POWER_PEAK_AT] = "SIMCALL_HOST_GET_POWER_PEAK_AT",
-[SIMCALL_HOST_GET_NB_PSTATES] = "SIMCALL_HOST_GET_NB_PSTATES",
-[SIMCALL_HOST_SET_POWER_PEAK_AT] = "SIMCALL_HOST_SET_POWER_PEAK_AT",
-[SIMCALL_HOST_GET_CONSUMED_ENERGY] = "SIMCALL_HOST_GET_CONSUMED_ENERGY",
-[SIMCALL_HOST_EXECUTE] = "SIMCALL_HOST_EXECUTE",
-[SIMCALL_HOST_PARALLEL_EXECUTE] = "SIMCALL_HOST_PARALLEL_EXECUTE",
-[SIMCALL_HOST_EXECUTION_DESTROY] = "SIMCALL_HOST_EXECUTION_DESTROY",
-[SIMCALL_HOST_EXECUTION_CANCEL] = "SIMCALL_HOST_EXECUTION_CANCEL",
-[SIMCALL_HOST_EXECUTION_GET_REMAINS] = "SIMCALL_HOST_EXECUTION_GET_REMAINS",
-[SIMCALL_HOST_EXECUTION_GET_STATE] = "SIMCALL_HOST_EXECUTION_GET_STATE",
-[SIMCALL_HOST_EXECUTION_SET_PRIORITY] = "SIMCALL_HOST_EXECUTION_SET_PRIORITY",
-[SIMCALL_HOST_EXECUTION_SET_BOUND] = "SIMCALL_HOST_EXECUTION_SET_BOUND",
-[SIMCALL_HOST_EXECUTION_SET_AFFINITY] = "SIMCALL_HOST_EXECUTION_SET_AFFINITY",
-[SIMCALL_HOST_EXECUTION_WAIT] = "SIMCALL_HOST_EXECUTION_WAIT",
-[SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST] = "SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST",
-[SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST] = "SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST",
-[SIMCALL_HOST_GET_PARAMS] = "SIMCALL_HOST_GET_PARAMS",
-[SIMCALL_HOST_SET_PARAMS] = "SIMCALL_HOST_SET_PARAMS",
-[SIMCALL_VM_CREATE] = "SIMCALL_VM_CREATE",
-[SIMCALL_VM_START] = "SIMCALL_VM_START",
-[SIMCALL_VM_GET_STATE] = "SIMCALL_VM_GET_STATE",
-[SIMCALL_VM_MIGRATE] = "SIMCALL_VM_MIGRATE",
-[SIMCALL_VM_GET_PM] = "SIMCALL_VM_GET_PM",
-[SIMCALL_VM_SET_BOUND] = "SIMCALL_VM_SET_BOUND",
-[SIMCALL_VM_SET_AFFINITY] = "SIMCALL_VM_SET_AFFINITY",
-[SIMCALL_VM_DESTROY] = "SIMCALL_VM_DESTROY",
-[SIMCALL_VM_SUSPEND] = "SIMCALL_VM_SUSPEND",
-[SIMCALL_VM_RESUME] = "SIMCALL_VM_RESUME",
-[SIMCALL_VM_SHUTDOWN] = "SIMCALL_VM_SHUTDOWN",
-[SIMCALL_VM_SAVE] = "SIMCALL_VM_SAVE",
-[SIMCALL_VM_RESTORE] = "SIMCALL_VM_RESTORE",
-[SIMCALL_PROCESS_CREATE] = "SIMCALL_PROCESS_CREATE",
-[SIMCALL_PROCESS_KILL] = "SIMCALL_PROCESS_KILL",
-[SIMCALL_PROCESS_KILLALL] = "SIMCALL_PROCESS_KILLALL",
-[SIMCALL_PROCESS_CLEANUP] = "SIMCALL_PROCESS_CLEANUP",
-[SIMCALL_PROCESS_CHANGE_HOST] = "SIMCALL_PROCESS_CHANGE_HOST",
-[SIMCALL_PROCESS_SUSPEND] = "SIMCALL_PROCESS_SUSPEND",
-[SIMCALL_PROCESS_RESUME] = "SIMCALL_PROCESS_RESUME",
-[SIMCALL_PROCESS_COUNT] = "SIMCALL_PROCESS_COUNT",
-[SIMCALL_PROCESS_GET_PID] = "SIMCALL_PROCESS_GET_PID",
-[SIMCALL_PROCESS_GET_PPID] = "SIMCALL_PROCESS_GET_PPID",
-[SIMCALL_PROCESS_GET_DATA] = "SIMCALL_PROCESS_GET_DATA",
-[SIMCALL_PROCESS_SET_DATA] = "SIMCALL_PROCESS_SET_DATA",
-[SIMCALL_PROCESS_GET_HOST] = "SIMCALL_PROCESS_GET_HOST",
-[SIMCALL_PROCESS_GET_NAME] = "SIMCALL_PROCESS_GET_NAME",
-[SIMCALL_PROCESS_IS_SUSPENDED] = "SIMCALL_PROCESS_IS_SUSPENDED",
-[SIMCALL_PROCESS_GET_PROPERTIES] = "SIMCALL_PROCESS_GET_PROPERTIES",
-[SIMCALL_PROCESS_JOIN] = "SIMCALL_PROCESS_JOIN",
-[SIMCALL_PROCESS_SLEEP] = "SIMCALL_PROCESS_SLEEP",
-[SIMCALL_PROCESS_ON_EXIT] = "SIMCALL_PROCESS_ON_EXIT",
-[SIMCALL_PROCESS_AUTO_RESTART_SET] = "SIMCALL_PROCESS_AUTO_RESTART_SET",
-[SIMCALL_PROCESS_RESTART] = "SIMCALL_PROCESS_RESTART",
-[SIMCALL_RDV_CREATE] = "SIMCALL_RDV_CREATE",
-[SIMCALL_RDV_DESTROY] = "SIMCALL_RDV_DESTROY",
-[SIMCALL_RDV_COMM_COUNT_BY_HOST] = "SIMCALL_RDV_COMM_COUNT_BY_HOST",
-[SIMCALL_RDV_GET_HEAD] = "SIMCALL_RDV_GET_HEAD",
-[SIMCALL_RDV_SET_RECEIVER] = "SIMCALL_RDV_SET_RECEIVER",
-[SIMCALL_RDV_GET_RECEIVER] = "SIMCALL_RDV_GET_RECEIVER",
-[SIMCALL_COMM_IPROBE] = "SIMCALL_COMM_IPROBE",
-[SIMCALL_COMM_SEND] = "SIMCALL_COMM_SEND",
-[SIMCALL_COMM_ISEND] = "SIMCALL_COMM_ISEND",
-[SIMCALL_COMM_RECV] = "SIMCALL_COMM_RECV",
-[SIMCALL_COMM_IRECV] = "SIMCALL_COMM_IRECV",
-[SIMCALL_COMM_CANCEL] = "SIMCALL_COMM_CANCEL",
-[SIMCALL_COMM_WAITANY] = "SIMCALL_COMM_WAITANY",
-[SIMCALL_COMM_WAIT] = "SIMCALL_COMM_WAIT",
-[SIMCALL_COMM_TEST] = "SIMCALL_COMM_TEST",
-[SIMCALL_COMM_TESTANY] = "SIMCALL_COMM_TESTANY",
-[SIMCALL_COMM_GET_REMAINS] = "SIMCALL_COMM_GET_REMAINS",
-[SIMCALL_COMM_GET_STATE] = "SIMCALL_COMM_GET_STATE",
-[SIMCALL_COMM_GET_SRC_DATA] = "SIMCALL_COMM_GET_SRC_DATA",
-[SIMCALL_COMM_GET_DST_DATA] = "SIMCALL_COMM_GET_DST_DATA",
-[SIMCALL_COMM_GET_SRC_PROC] = "SIMCALL_COMM_GET_SRC_PROC",
-[SIMCALL_COMM_GET_DST_PROC] = "SIMCALL_COMM_GET_DST_PROC",
-[SIMCALL_MUTEX_INIT] = "SIMCALL_MUTEX_INIT",
-[SIMCALL_MUTEX_DESTROY] = "SIMCALL_MUTEX_DESTROY",
-[SIMCALL_MUTEX_LOCK] = "SIMCALL_MUTEX_LOCK",
-[SIMCALL_MUTEX_TRYLOCK] = "SIMCALL_MUTEX_TRYLOCK",
-[SIMCALL_MUTEX_UNLOCK] = "SIMCALL_MUTEX_UNLOCK",
-[SIMCALL_COND_INIT] = "SIMCALL_COND_INIT",
-[SIMCALL_COND_DESTROY] = "SIMCALL_COND_DESTROY",
-[SIMCALL_COND_SIGNAL] = "SIMCALL_COND_SIGNAL",
-[SIMCALL_COND_WAIT] = "SIMCALL_COND_WAIT",
-[SIMCALL_COND_WAIT_TIMEOUT] = "SIMCALL_COND_WAIT_TIMEOUT",
-[SIMCALL_COND_BROADCAST] = "SIMCALL_COND_BROADCAST",
-[SIMCALL_SEM_INIT] = "SIMCALL_SEM_INIT",
-[SIMCALL_SEM_DESTROY] = "SIMCALL_SEM_DESTROY",
-[SIMCALL_SEM_RELEASE] = "SIMCALL_SEM_RELEASE",
-[SIMCALL_SEM_WOULD_BLOCK] = "SIMCALL_SEM_WOULD_BLOCK",
-[SIMCALL_SEM_ACQUIRE] = "SIMCALL_SEM_ACQUIRE",
-[SIMCALL_SEM_ACQUIRE_TIMEOUT] = "SIMCALL_SEM_ACQUIRE_TIMEOUT",
-[SIMCALL_SEM_GET_CAPACITY] = "SIMCALL_SEM_GET_CAPACITY",
-[SIMCALL_FILE_READ] = "SIMCALL_FILE_READ",
-[SIMCALL_FILE_WRITE] = "SIMCALL_FILE_WRITE",
-[SIMCALL_FILE_OPEN] = "SIMCALL_FILE_OPEN",
-[SIMCALL_FILE_CLOSE] = "SIMCALL_FILE_CLOSE",
-[SIMCALL_FILE_UNLINK] = "SIMCALL_FILE_UNLINK",
-[SIMCALL_FILE_GET_SIZE] = "SIMCALL_FILE_GET_SIZE",
-[SIMCALL_FILE_TELL] = "SIMCALL_FILE_TELL",
-[SIMCALL_FILE_SEEK] = "SIMCALL_FILE_SEEK",
-[SIMCALL_FILE_GET_INFO] = "SIMCALL_FILE_GET_INFO",
-[SIMCALL_FILE_MOVE] = "SIMCALL_FILE_MOVE",
-[SIMCALL_STORAGE_GET_FREE_SIZE] = "SIMCALL_STORAGE_GET_FREE_SIZE",
-[SIMCALL_STORAGE_GET_USED_SIZE] = "SIMCALL_STORAGE_GET_USED_SIZE",
-[SIMCALL_STORAGE_GET_PROPERTIES] = "SIMCALL_STORAGE_GET_PROPERTIES",
-[SIMCALL_STORAGE_GET_CONTENT] = "SIMCALL_STORAGE_GET_CONTENT",
-[SIMCALL_ASR_GET_PROPERTIES] = "SIMCALL_ASR_GET_PROPERTIES",
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-[SIMCALL_COMM_IS_LATENCY_BOUNDED] = "SIMCALL_COMM_IS_LATENCY_BOUNDED",
-#endif
-
-#ifdef HAVE_TRACING
-[SIMCALL_SET_CATEGORY] = "SIMCALL_SET_CATEGORY",
-#endif
-
-#ifdef HAVE_MC
-[SIMCALL_MC_SNAPSHOT] = "SIMCALL_MC_SNAPSHOT",
-[SIMCALL_MC_COMPARE_SNAPSHOTS] = "SIMCALL_MC_COMPARE_SNAPSHOTS",
-[SIMCALL_MC_RANDOM] = "SIMCALL_MC_RANDOM",
-#endif
similarity index 75%
rename from src/simix/smx_simcall_enter.c
rename to src/simix/smx_popping_generated.c
index 71abd91..2cee0fd 100644 (file)
@@ -1,11 +1,17 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
-
-
+/**********************************************************************/
+/* File Generated by src/simix/simcalls.py from src/simix/simcalls.in */
+/*                                                                    */
+/*                    DO NOT EVER CHANGE THIS FILE                    */
+/*                                                                    */
+/* change simcalls specification in src/simix/simcalls.in             */
+/**********************************************************************/
+
+/*
+ * Note that the name comes from http://en.wikipedia.org/wiki/Popping 
+ * Indeed, the control flow is doing a strange dance in there.
+ *
+ * That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
+ */
 
 #include "smx_private.h"
 #ifdef HAVE_MC
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_smurf);
 
+/** @brief Simcalls' names (generated from src/simix/simcalls.in) */
+const char* simcall_names[] = {
+[SIMCALL_HOST_GET_BY_NAME] = "SIMCALL_HOST_GET_BY_NAME",
+[SIMCALL_HOST_GET_NAME] = "SIMCALL_HOST_GET_NAME",
+[SIMCALL_HOST_ON] = "SIMCALL_HOST_ON",
+[SIMCALL_HOST_OFF] = "SIMCALL_HOST_OFF",
+[SIMCALL_HOST_GET_PROPERTIES] = "SIMCALL_HOST_GET_PROPERTIES",
+[SIMCALL_HOST_GET_CORE] = "SIMCALL_HOST_GET_CORE",
+[SIMCALL_HOST_GET_PROCESS_LIST] = "SIMCALL_HOST_GET_PROCESS_LIST",
+[SIMCALL_HOST_GET_SPEED] = "SIMCALL_HOST_GET_SPEED",
+[SIMCALL_HOST_GET_AVAILABLE_SPEED] = "SIMCALL_HOST_GET_AVAILABLE_SPEED",
+[SIMCALL_HOST_GET_STATE] = "SIMCALL_HOST_GET_STATE",
+[SIMCALL_HOST_GET_CURRENT_POWER_PEAK] = "SIMCALL_HOST_GET_CURRENT_POWER_PEAK",
+[SIMCALL_HOST_GET_POWER_PEAK_AT] = "SIMCALL_HOST_GET_POWER_PEAK_AT",
+[SIMCALL_HOST_GET_NB_PSTATES] = "SIMCALL_HOST_GET_NB_PSTATES",
+[SIMCALL_HOST_SET_POWER_PEAK_AT] = "SIMCALL_HOST_SET_POWER_PEAK_AT",
+[SIMCALL_HOST_GET_CONSUMED_ENERGY] = "SIMCALL_HOST_GET_CONSUMED_ENERGY",
+[SIMCALL_HOST_EXECUTE] = "SIMCALL_HOST_EXECUTE",
+[SIMCALL_HOST_PARALLEL_EXECUTE] = "SIMCALL_HOST_PARALLEL_EXECUTE",
+[SIMCALL_HOST_EXECUTION_DESTROY] = "SIMCALL_HOST_EXECUTION_DESTROY",
+[SIMCALL_HOST_EXECUTION_CANCEL] = "SIMCALL_HOST_EXECUTION_CANCEL",
+[SIMCALL_HOST_EXECUTION_GET_REMAINS] = "SIMCALL_HOST_EXECUTION_GET_REMAINS",
+[SIMCALL_HOST_EXECUTION_GET_STATE] = "SIMCALL_HOST_EXECUTION_GET_STATE",
+[SIMCALL_HOST_EXECUTION_SET_PRIORITY] = "SIMCALL_HOST_EXECUTION_SET_PRIORITY",
+[SIMCALL_HOST_EXECUTION_SET_BOUND] = "SIMCALL_HOST_EXECUTION_SET_BOUND",
+[SIMCALL_HOST_EXECUTION_SET_AFFINITY] = "SIMCALL_HOST_EXECUTION_SET_AFFINITY",
+[SIMCALL_HOST_EXECUTION_WAIT] = "SIMCALL_HOST_EXECUTION_WAIT",
+[SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST] = "SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST",
+[SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST] = "SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST",
+[SIMCALL_HOST_GET_PARAMS] = "SIMCALL_HOST_GET_PARAMS",
+[SIMCALL_HOST_SET_PARAMS] = "SIMCALL_HOST_SET_PARAMS",
+[SIMCALL_VM_CREATE] = "SIMCALL_VM_CREATE",
+[SIMCALL_VM_START] = "SIMCALL_VM_START",
+[SIMCALL_VM_GET_STATE] = "SIMCALL_VM_GET_STATE",
+[SIMCALL_VM_MIGRATE] = "SIMCALL_VM_MIGRATE",
+[SIMCALL_VM_GET_PM] = "SIMCALL_VM_GET_PM",
+[SIMCALL_VM_SET_BOUND] = "SIMCALL_VM_SET_BOUND",
+[SIMCALL_VM_SET_AFFINITY] = "SIMCALL_VM_SET_AFFINITY",
+[SIMCALL_VM_DESTROY] = "SIMCALL_VM_DESTROY",
+[SIMCALL_VM_SUSPEND] = "SIMCALL_VM_SUSPEND",
+[SIMCALL_VM_RESUME] = "SIMCALL_VM_RESUME",
+[SIMCALL_VM_SHUTDOWN] = "SIMCALL_VM_SHUTDOWN",
+[SIMCALL_VM_SAVE] = "SIMCALL_VM_SAVE",
+[SIMCALL_VM_RESTORE] = "SIMCALL_VM_RESTORE",
+[SIMCALL_PROCESS_CREATE] = "SIMCALL_PROCESS_CREATE",
+[SIMCALL_PROCESS_KILL] = "SIMCALL_PROCESS_KILL",
+[SIMCALL_PROCESS_KILLALL] = "SIMCALL_PROCESS_KILLALL",
+[SIMCALL_PROCESS_CLEANUP] = "SIMCALL_PROCESS_CLEANUP",
+[SIMCALL_PROCESS_CHANGE_HOST] = "SIMCALL_PROCESS_CHANGE_HOST",
+[SIMCALL_PROCESS_SUSPEND] = "SIMCALL_PROCESS_SUSPEND",
+[SIMCALL_PROCESS_RESUME] = "SIMCALL_PROCESS_RESUME",
+[SIMCALL_PROCESS_COUNT] = "SIMCALL_PROCESS_COUNT",
+[SIMCALL_PROCESS_GET_PID] = "SIMCALL_PROCESS_GET_PID",
+[SIMCALL_PROCESS_GET_PPID] = "SIMCALL_PROCESS_GET_PPID",
+[SIMCALL_PROCESS_GET_DATA] = "SIMCALL_PROCESS_GET_DATA",
+[SIMCALL_PROCESS_SET_DATA] = "SIMCALL_PROCESS_SET_DATA",
+[SIMCALL_PROCESS_GET_HOST] = "SIMCALL_PROCESS_GET_HOST",
+[SIMCALL_PROCESS_GET_NAME] = "SIMCALL_PROCESS_GET_NAME",
+[SIMCALL_PROCESS_IS_SUSPENDED] = "SIMCALL_PROCESS_IS_SUSPENDED",
+[SIMCALL_PROCESS_GET_PROPERTIES] = "SIMCALL_PROCESS_GET_PROPERTIES",
+[SIMCALL_PROCESS_JOIN] = "SIMCALL_PROCESS_JOIN",
+[SIMCALL_PROCESS_SLEEP] = "SIMCALL_PROCESS_SLEEP",
+[SIMCALL_PROCESS_ON_EXIT] = "SIMCALL_PROCESS_ON_EXIT",
+[SIMCALL_PROCESS_AUTO_RESTART_SET] = "SIMCALL_PROCESS_AUTO_RESTART_SET",
+[SIMCALL_PROCESS_RESTART] = "SIMCALL_PROCESS_RESTART",
+[SIMCALL_RDV_CREATE] = "SIMCALL_RDV_CREATE",
+[SIMCALL_RDV_DESTROY] = "SIMCALL_RDV_DESTROY",
+[SIMCALL_RDV_COMM_COUNT_BY_HOST] = "SIMCALL_RDV_COMM_COUNT_BY_HOST",
+[SIMCALL_RDV_GET_HEAD] = "SIMCALL_RDV_GET_HEAD",
+[SIMCALL_RDV_SET_RECEIVER] = "SIMCALL_RDV_SET_RECEIVER",
+[SIMCALL_RDV_GET_RECEIVER] = "SIMCALL_RDV_GET_RECEIVER",
+[SIMCALL_COMM_IPROBE] = "SIMCALL_COMM_IPROBE",
+[SIMCALL_COMM_SEND] = "SIMCALL_COMM_SEND",
+[SIMCALL_COMM_ISEND] = "SIMCALL_COMM_ISEND",
+[SIMCALL_COMM_RECV] = "SIMCALL_COMM_RECV",
+[SIMCALL_COMM_IRECV] = "SIMCALL_COMM_IRECV",
+[SIMCALL_COMM_CANCEL] = "SIMCALL_COMM_CANCEL",
+[SIMCALL_COMM_WAITANY] = "SIMCALL_COMM_WAITANY",
+[SIMCALL_COMM_WAIT] = "SIMCALL_COMM_WAIT",
+[SIMCALL_COMM_TEST] = "SIMCALL_COMM_TEST",
+[SIMCALL_COMM_TESTANY] = "SIMCALL_COMM_TESTANY",
+[SIMCALL_COMM_GET_REMAINS] = "SIMCALL_COMM_GET_REMAINS",
+[SIMCALL_COMM_GET_STATE] = "SIMCALL_COMM_GET_STATE",
+[SIMCALL_COMM_GET_SRC_DATA] = "SIMCALL_COMM_GET_SRC_DATA",
+[SIMCALL_COMM_GET_DST_DATA] = "SIMCALL_COMM_GET_DST_DATA",
+[SIMCALL_COMM_GET_SRC_PROC] = "SIMCALL_COMM_GET_SRC_PROC",
+[SIMCALL_COMM_GET_DST_PROC] = "SIMCALL_COMM_GET_DST_PROC",
+[SIMCALL_MUTEX_INIT] = "SIMCALL_MUTEX_INIT",
+[SIMCALL_MUTEX_DESTROY] = "SIMCALL_MUTEX_DESTROY",
+[SIMCALL_MUTEX_LOCK] = "SIMCALL_MUTEX_LOCK",
+[SIMCALL_MUTEX_TRYLOCK] = "SIMCALL_MUTEX_TRYLOCK",
+[SIMCALL_MUTEX_UNLOCK] = "SIMCALL_MUTEX_UNLOCK",
+[SIMCALL_COND_INIT] = "SIMCALL_COND_INIT",
+[SIMCALL_COND_DESTROY] = "SIMCALL_COND_DESTROY",
+[SIMCALL_COND_SIGNAL] = "SIMCALL_COND_SIGNAL",
+[SIMCALL_COND_WAIT] = "SIMCALL_COND_WAIT",
+[SIMCALL_COND_WAIT_TIMEOUT] = "SIMCALL_COND_WAIT_TIMEOUT",
+[SIMCALL_COND_BROADCAST] = "SIMCALL_COND_BROADCAST",
+[SIMCALL_SEM_INIT] = "SIMCALL_SEM_INIT",
+[SIMCALL_SEM_DESTROY] = "SIMCALL_SEM_DESTROY",
+[SIMCALL_SEM_RELEASE] = "SIMCALL_SEM_RELEASE",
+[SIMCALL_SEM_WOULD_BLOCK] = "SIMCALL_SEM_WOULD_BLOCK",
+[SIMCALL_SEM_ACQUIRE] = "SIMCALL_SEM_ACQUIRE",
+[SIMCALL_SEM_ACQUIRE_TIMEOUT] = "SIMCALL_SEM_ACQUIRE_TIMEOUT",
+[SIMCALL_SEM_GET_CAPACITY] = "SIMCALL_SEM_GET_CAPACITY",
+[SIMCALL_FILE_READ] = "SIMCALL_FILE_READ",
+[SIMCALL_FILE_WRITE] = "SIMCALL_FILE_WRITE",
+[SIMCALL_FILE_OPEN] = "SIMCALL_FILE_OPEN",
+[SIMCALL_FILE_CLOSE] = "SIMCALL_FILE_CLOSE",
+[SIMCALL_FILE_UNLINK] = "SIMCALL_FILE_UNLINK",
+[SIMCALL_FILE_GET_SIZE] = "SIMCALL_FILE_GET_SIZE",
+[SIMCALL_FILE_TELL] = "SIMCALL_FILE_TELL",
+[SIMCALL_FILE_SEEK] = "SIMCALL_FILE_SEEK",
+[SIMCALL_FILE_GET_INFO] = "SIMCALL_FILE_GET_INFO",
+[SIMCALL_FILE_MOVE] = "SIMCALL_FILE_MOVE",
+[SIMCALL_STORAGE_GET_FREE_SIZE] = "SIMCALL_STORAGE_GET_FREE_SIZE",
+[SIMCALL_STORAGE_GET_USED_SIZE] = "SIMCALL_STORAGE_GET_USED_SIZE",
+[SIMCALL_STORAGE_GET_PROPERTIES] = "SIMCALL_STORAGE_GET_PROPERTIES",
+[SIMCALL_STORAGE_GET_CONTENT] = "SIMCALL_STORAGE_GET_CONTENT",
+[SIMCALL_ASR_GET_PROPERTIES] = "SIMCALL_ASR_GET_PROPERTIES",
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+[SIMCALL_COMM_IS_LATENCY_BOUNDED] = "SIMCALL_COMM_IS_LATENCY_BOUNDED",
+#endif
+
+#ifdef HAVE_TRACING
+[SIMCALL_SET_CATEGORY] = "SIMCALL_SET_CATEGORY",
+#endif
+
+#ifdef HAVE_MC
+[SIMCALL_MC_SNAPSHOT] = "SIMCALL_MC_SNAPSHOT",
+[SIMCALL_MC_COMPARE_SNAPSHOTS] = "SIMCALL_MC_COMPARE_SNAPSHOTS",
+[SIMCALL_MC_RANDOM] = "SIMCALL_MC_RANDOM",
+#endif
+[SIMCALL_NONE] = "NONE"
+};
+
 /**
- * @brief unpack the simcall and activate the handler in kernel mode
+ * @brief (in kernel mode) unpack the simcall and activate the handler
+ * 
+ * This function is generated from src/simix/simcalls.in
  */
-void SIMIX_simcall_enter(smx_simcall_t simcall, int value)
-{
+void SIMIX_simcall_enter(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:
+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;  
@@ -628,7 +771,6 @@ case SIMCALL_MC_RANDOM:
       break;  
 
 #endif
-
     case NUM_SIMCALLS:
       break;
     case SIMCALL_NONE:
@@ -646,4 +788,3 @@ case SIMCALL_MC_RANDOM:
       break;
   }
 }
-  
\ No newline at end of file
index bc10372..4c6c382 100644 (file)
 SG_BEGIN_DECL()
 
 /********************************* Simcalls *********************************/
-
-/* we want to build the e_smx_simcall_t enumeration, the table of the
- * corresponding simcalls string names, and the simcall handlers table
- * automatically, using macros.
- * To add a new simcall follow the following syntax:
- *
- * */
+XBT_PUBLIC(const char*) simcall_names[]; /* Name of each simcall */
 
 #include "simcalls_generated_enum.h" /* All possible simcalls (generated) */
 
@@ -57,7 +51,6 @@ typedef struct s_smx_simcall {
 #endif
   union u_smx_scalar args[11];
   union u_smx_scalar result;
-  //FIXME: union u_smx_scalar retval;
   union {
     struct {
       const char* param1;
@@ -87,7 +80,7 @@ void SIMIX_simcall_enter(smx_simcall_t, int);
 void SIMIX_simcall_exit(smx_action_t);
 smx_simcall_t SIMIX_simcall_mine(void);
 const char *SIMIX_simcall_name(e_smx_simcall_t kind);
-//TOFIX put it in a better place
+//FIXME put it in a better place
 xbt_dict_t SIMIX_pre_asr_get_properties(smx_simcall_t simcall, const char *name);
 
 /*************************** New simcall interface ****************************/
index 16e1f6a..5717c2a 100644 (file)
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
-/* generate strings from the enumeration values */
-static const char* simcall_names[] = {
-#include "simcalls_generated_string.c"
-[SIMCALL_NONE] = "NONE"
-};
-
 #include "simcalls_generated_body.c"
 
 /**