Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sanitize the prototype of Actor::on_exit() callbacks
[simgrid.git] / include / simgrid / simix.h
index c8d991d..05f0e26 100644 (file)
@@ -129,12 +129,13 @@ XBT_PUBLIC void SIMIX_launch_application(const std::string& file);
  */
 
 #ifdef __cplusplus
-XBT_PUBLIC smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostname,
-                                            std::unordered_map<std::string, std::string>* properties,
-                                            smx_actor_t parent_process);
+XBT_ATTRIB_DEPRECATED_v325("Please use ActorImpl::attach() or sg_actor_attach()") XBT_PUBLIC smx_actor_t
+    SIMIX_process_attach(const char* name, void* data, const char* hostname,
+                         std::unordered_map<std::string, std::string>* properties, smx_actor_t parent_process);
 #endif
 SG_BEGIN_DECL()
-XBT_PUBLIC void SIMIX_process_detach();
+XBT_ATTRIB_DEPRECATED_v325("Please use ActorImpl::detach() or sg_actor_detach()") XBT_PUBLIC
+    void SIMIX_process_detach();
 SG_END_DECL()
 
 /********************************* Process ************************************/
@@ -149,7 +150,8 @@ XBT_PUBLIC void SIMIX_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t f
 SG_END_DECL()
 
 #ifdef __cplusplus
-XBT_PUBLIC void SIMIX_process_on_exit(smx_actor_t process, std::function<void(int, void*)> fun, void* data);
+XBT_PUBLIC void SIMIX_process_on_exit(smx_actor_t process, std::function<void(bool /*failed*/, void* /*data*/)> fun,
+                                      void* data);
 #endif
 
 /****************************** Communication *********************************/
@@ -226,17 +228,18 @@ XBT_PUBLIC smx_activity_t simcall_comm_iprobe(smx_mailbox_t mbox, int type,
                                               void* data);
 
 /* FIXME: waitany is going to be a vararg function, and should take a timeout */
-XBT_PUBLIC unsigned int simcall_comm_waitany(smx_activity_t* comms, size_t count, double timeout);
+XBT_PUBLIC unsigned int simcall_comm_waitany(smx_activity_t comms[], size_t count, double timeout);
+XBT_PUBLIC unsigned int simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_t count,
+                                             double timeout);
 XBT_PUBLIC void simcall_comm_wait(const smx_activity_t& comm, double timeout);
 XBT_PUBLIC int simcall_comm_test(const smx_activity_t& comm);
-XBT_PUBLIC int simcall_comm_testany(smx_activity_t* comms, size_t count);
+XBT_PUBLIC int simcall_comm_testany(smx_activity_t comms[], size_t count);
+XBT_PUBLIC int simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_t count);
 #endif
 
 /************************** Synchro simcalls **********************************/
 SG_BEGIN_DECL()
 XBT_PUBLIC smx_mutex_t simcall_mutex_init();
-XBT_PUBLIC smx_mutex_t SIMIX_mutex_ref(smx_mutex_t mutex);
-XBT_PUBLIC void SIMIX_mutex_unref(smx_mutex_t mutex);
 XBT_PUBLIC void simcall_mutex_lock(smx_mutex_t mutex);
 XBT_PUBLIC int simcall_mutex_trylock(smx_mutex_t mutex);
 XBT_PUBLIC void simcall_mutex_unlock(smx_mutex_t mutex);