X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3bd0ffd5e6dd32ddf61c69456b490f2aa9f2517b..54bfe4859cf046c6cd9ea2ffb9069b106725f8ac:/include/simgrid/simix.hpp diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index d6731a9fe4..4548f6f1e7 100644 --- a/include/simgrid/simix.hpp +++ b/include/simgrid/simix.hpp @@ -70,41 +70,15 @@ XBT_PUBLIC const std::vector& process_get_runnable(); // What's executed as SIMIX actor code: typedef std::function ActorCode; -// Create ActorCode based on argv: +// Create an ActorCode based on a std::string typedef std::function args)> ActorCodeFactory; -XBT_PUBLIC void register_function(const char* name, ActorCodeFactory factory); - -/** These functions will be called when we detect a deadlock: any remaining process is locked on an action - * - * If these functions manage to unlock some of the processes, then the deadlock will be avoided. - */ -XBT_PUBLIC_DATA simgrid::xbt::signal onDeadlock; +XBT_PUBLIC void register_function(std::string name, ActorCodeFactory factory); } } -/* - * Type of function that creates a process. - * The function must accept the following parameters: - * void* process: the process created will be stored there - * const char *name: a name for the object. It is for user-level information and can be NULL - * xbt_main_func_t code: is a function describing the behavior of the process - * void *data: data a pointer to any data one may want to attach to the new object. - * sg_host_t host: the location where the new process is executed - * int argc, char **argv: parameters passed to code - * std::map* props: properties - */ -typedef smx_actor_t (*smx_creation_func_t)( - /* name */ const char*, std::function code, - /* userdata */ void*, - /* hostname */ sg_host_t, - /* props */ std::unordered_map*, - /* parent_process */ smx_actor_t); - -XBT_PUBLIC void SIMIX_function_register_process_create(smx_creation_func_t function); - -XBT_PUBLIC smx_actor_t simcall_process_create(const char* name, std::function code, void* data, sg_host_t host, - std::unordered_map* properties); +XBT_PUBLIC smx_actor_t simcall_process_create(std::string name, simgrid::simix::ActorCode code, void* data, + sg_host_t host, std::unordered_map* properties); XBT_PUBLIC smx_timer_t SIMIX_timer_set(double date, simgrid::xbt::Task callback);