Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove the 'TUTORIAL: New API' chunks
[simgrid.git] / src / simix / simcalls.py
index 19da031..7781eb3 100755 (executable)
@@ -206,7 +206,7 @@ def parse(fn):
 
 def header(fd):
     fd.write('/**********************************************************************/\n')
-    fd.write('/* File Generated by src/simix/simcalls.py from src/simix/simcalls.in */\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')
@@ -241,22 +241,37 @@ if __name__=='__main__':
   #  print ("Some checks fail!")
   #  sys.exit(1)
 
-  write('simcalls_generated_enum.h', Simcall.enum, 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)
+  
+  
+  fd = open("smx_popping_generated.h", 'w')
+  header(fd)
+  fd.write("""
+/*
+ * 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 :)
+ */
+
 /**
  * @brief All possible simcalls.
  */
 typedef enum {
 SIMCALL_NONE,
-  ""","""
-SIMCALL_NEW_API_INIT,
-NUM_SIMCALLS
-} e_smx_simcall_t;
   """)
   
-  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)
+  handle(fd, Simcall.enum, simcalls, simcalls_dict)
   
+  fd.write("""
+NUM_SIMCALLS
+} e_smx_simcall_t;
+  """)
+
   
+  fd.close()
+
   
   fd = open("smx_popping_generated.c", 'w')
   header(fd)
@@ -266,6 +281,7 @@ NUM_SIMCALLS
   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');
@@ -305,12 +321,6 @@ NUM_SIMCALLS
   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');