X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fd769219531a772284d75320187a0ef9f8118afd..905e26b959375a249abcfdf1599f6178fe031f44:/src/simix/Context.cpp diff --git a/src/simix/Context.cpp b/src/simix/Context.cpp index be5da21828..5817bc74e6 100644 --- a/src/simix/Context.cpp +++ b/src/simix/Context.cpp @@ -14,8 +14,7 @@ #include "mc/mc.h" -#include -#include +#include "src/simix/smx_private.h" void SIMIX_process_set_cleanup_function( smx_process_t process, void_pfn_smxprocess_t cleanup) @@ -24,22 +23,19 @@ void SIMIX_process_set_cleanup_function( } /** - * \brief creates a new context for a user level process - * \param code a main function - * \param argc the number of arguments of the main function - * \param argv the vector of arguments of the main function - * \param cleanup_func the function to call when the context stops - * \param cleanup_arg the argument of the cleanup_func function + * @brief creates a new context for a user level process + * @param code a main function + * @param cleanup_func the function to call when the context stops */ smx_context_t SIMIX_context_new( - xbt_main_func_t code, int argc, char **argv, + std::function code, void_pfn_smxprocess_t cleanup_func, smx_process_t simix_process) { if (!simix_global) xbt_die("simix is not initialized, please call MSG_init first"); return simix_global->context_factory->create_context( - simgrid::simix::wrap_main(code, argc, argv), cleanup_func, simix_process); + std::move(code), cleanup_func, simix_process); } namespace simgrid {