XBT_PUBLIC aid_t sg_actor_self_get_pid();
XBT_PUBLIC aid_t sg_actor_self_get_ppid();
XBT_PUBLIC const char* sg_actor_self_get_name();
+XBT_PUBLIC void sg_actor_ref(sg_actor_t actor);
+XBT_PUBLIC void sg_actor_unref(sg_actor_t actor);
SG_END_DECL()
XBT_PUBLIC aid_t MSG_process_self_PID();
XBT_PUBLIC aid_t MSG_process_self_PPID();
XBT_PUBLIC const char* MSG_process_self_name();
+XBT_PUBLIC void MSG_process_ref(msg_process_t process);
+XBT_PUBLIC void MSG_process_unref(msg_process_t process);
/** @brief Object representing an ongoing communication between processes.
*
XBT_PUBLIC void MSG_process_on_exit(int_f_int_pvoid_t fun, void* data);
-XBT_PUBLIC void MSG_process_ref(msg_process_t process);
-XBT_PUBLIC void MSG_process_unref(msg_process_t process);
-
/************************** Task handling ************************************/
XBT_PUBLIC msg_task_t MSG_task_create(const char* name, double flops_amount, double bytes_amount, void* data);
XBT_PUBLIC msg_task_t MSG_parallel_task_create(const char* name, int host_nb, const msg_host_t* host_list,
return sg_actor_self();
}
+/** @brief Take an extra reference on that process to prevent it to be garbage-collected */
+void MSG_process_ref(msg_process_t process)
+{
+ sg_actor_ref(process);
+}
+/** @brief Release a reference on that process so that it can get be garbage-collected */
+void MSG_process_unref(msg_process_t process)
+{
+ sg_actor_unref(process);
+}
+
/* ************************** NetZones *************************** */
sg_netzone_t MSG_zone_get_root()
{
simgrid::s4u::this_actor::on_exit(
[fun, data](bool failed) { fun(failed ? SMX_EXIT_FAILURE : SMX_EXIT_SUCCESS, data); });
}
-
-/** @brief Take an extra reference on that process to prevent it to be garbage-collected */
-XBT_PUBLIC void MSG_process_ref(msg_process_t process)
-{
- intrusive_ptr_add_ref(process);
-}
-/** @brief Release a reference on that process so that it can get be garbage-collected */
-XBT_PUBLIC void MSG_process_unref(msg_process_t process)
-{
- intrusive_ptr_release(process);
-}
{
return simgrid::s4u::Actor::self();
}
+
+/** @brief Take an extra reference on that actor to prevent it to be garbage-collected */
+void sg_actor_ref(sg_actor_t actor)
+{
+ intrusive_ptr_add_ref(actor);
+}
+/** @brief Release a reference on that actor so that it can get be garbage-collected */
+void sg_actor_unref(sg_actor_t actor)
+{
+ intrusive_ptr_release(actor);
+}