Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allows the bytes_amount argument of MSG_parallel_task_create to be null.
[simgrid.git] / src / simix / BoostContext.hpp
index 4f64f41..c2df0d1 100644 (file)
@@ -10,6 +10,7 @@
 #ifndef SIMGRID_SIMIX_BOOST_CONTEXT_HPP
 #define SIMGRID_SIMIX_BOOST_CONTEXT_HPP
 
+#include <functional>
 #include <vector>
 
 #include <xbt/parmap.h>
@@ -43,8 +44,7 @@ protected:
   void* stack_ = nullptr;
 public:
   friend BoostContextFactory;
-  BoostContext(xbt_main_func_t code,
-          int argc, char **argv,
+  BoostContext(std::function<void()> code,
           void_pfn_smxprocess_t cleanup_func,
           smx_process_t process);
   ~BoostContext();
@@ -61,10 +61,8 @@ public:
 
   BoostContextFactory();
   virtual ~BoostContextFactory();
-  virtual Context* create_context(
-    xbt_main_func_t, int, char **, void_pfn_smxprocess_t,
-    smx_process_t process
-    ) override;
+  virtual Context* create_context(std::function<void()> code,
+    void_pfn_smxprocess_t, smx_process_t process) override;
   void run_all() override;
 };