Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the amount of implicit include directories
[simgrid.git] / src / simix / simcalls.py
index 321a63b..e65b78a 100755 (executable)
@@ -177,7 +177,7 @@ class Simcall(object):
       
   def handler_prototype(self):
       if self.need_handler:
-          return "%s simcall_HANDLER_%s(smx_simcall_t simcall%s);"%(self.res.rettype() if self.call_kind == 'Func' else 'void', 
+          return "XBT_PRIVATE %s simcall_HANDLER_%s(smx_simcall_t simcall%s);"%(self.res.rettype() if self.call_kind == 'Func' else 'void', 
                                                                     self.name, 
                                                                     ''.join(', %s %s'%(arg.rettype(), arg.name) 
                     for i, arg in enumerate(self.args)))
@@ -279,10 +279,10 @@ if __name__=='__main__':
   
   fd = header("popping_generated.c")
   
+  fd.write('#include <xbt/base.h>\n');
   fd.write('#include "smx_private.h"\n');
   fd.write('#ifdef HAVE_MC\n');
-  fd.write('#include "mc/mc_process.h"\n');
-  fd.write('#include "mc/mc_model_checker.h"\n');
+  fd.write('#include "src/mc/mc_forward.h"\n');
   fd.write('#endif\n');
   fd.write('\n');
   fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);\n\n');
@@ -303,11 +303,6 @@ if __name__=='__main__':
   fd.write(' */\n');
   fd.write('void SIMIX_simcall_handle(smx_simcall_t simcall, int value) {\n');
   fd.write('  XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));\n');
-  fd.write('  #ifdef HAVE_MC\n');
-  fd.write('  if (mc_model_checker) {\n');
-  fd.write('    mc_model_checker->process.cache_flags = 0;\n');
-  fd.write('  }\n');
-  fd.write('  #endif\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');
@@ -334,7 +329,7 @@ if __name__=='__main__':
   ###
   fd = header('popping_bodies.c')
   fd.write('#include "smx_private.h"\n')
-  fd.write('#include "mc/mc_interface.h"\n')
+  fd.write('#include "src/mc/mc_forward.h"\n')
   fd.write('#include "xbt/ex.h"\n')
   handle(fd, Simcall.body, simcalls, simcalls_dict)
   fd.close()