X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8a0e2b82a1c0981a84e67f1bb4afb6e16fbf8c3a..fc8be6494932e66a359ae5d47103a566cc8234f4:/include/simgrid/simix.hpp diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index 9943239d5c..f2273046a0 100644 --- a/include/simgrid/simix.hpp +++ b/include/simgrid/simix.hpp @@ -61,9 +61,7 @@ template typename std::result_of::type simcall(F&& code) // conveniently handles the success/failure value for us. typedef typename std::result_of::type R; simgrid::xbt::Result result; - simcall_run_kernel([&]{ - simgrid::xbt::fulfillPromise(result, std::forward(code)); - }); + simcall_run_kernel([&] { simgrid::xbt::fulfill_promise(result, std::forward(code)); }); return result.get(); } @@ -77,11 +75,6 @@ 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; } } @@ -97,7 +90,7 @@ XBT_PUBLIC_DATA simgrid::xbt::signal onDeadlock; * std::map* props: properties */ typedef smx_actor_t (*smx_creation_func_t)( - /* name */ const char*, std::function code, + /* name */ const char*, simgrid::simix::ActorCode code, /* userdata */ void*, /* hostname */ sg_host_t, /* props */ std::unordered_map*, @@ -105,7 +98,7 @@ typedef smx_actor_t (*smx_creation_func_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, +XBT_PUBLIC smx_actor_t simcall_process_create(const char* 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);