Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Instr: Add MIGRATE states for SMPI/LB.
[simgrid.git] / include / simgrid / msg.h
index c88f4b9..9f7d0cd 100644 (file)
 #include <simgrid/storage.h>
 #include <simgrid/vm.h>
 #include <simgrid/zone.h>
-#include <xbt/base.h>
-#include <xbt/dict.h>
-#include <xbt/dynar.h>
+#include <xbt.h>
+
+#ifdef MIN
+#undef MIN
+#endif
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+#ifdef MAX
+#undef MAX
+#endif
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
 
 #ifdef __cplusplus
 #include <map>
@@ -76,12 +84,6 @@ XBT_PUBLIC void MSG_host_get_process_list(sg_host_t host, xbt_dynar_t whereto);
 
 XBT_PUBLIC sg_host_t MSG_host_self();
 
-XBT_ATTRIB_DEPRECATED_v320("Use MSG_host_get_speed(): v3.20 will drop MSG_host_get_current_power_peak() "
-                           "completely.") static inline double MSG_host_get_current_power_peak(msg_host_t host)
-{
-  return sg_host_speed(host);
-}
-
 /* ******************************** VMs ************************************* */
 typedef sg_vm_t msg_vm_t;
 
@@ -140,6 +142,10 @@ XBT_PUBLIC void MSG_process_resume(msg_process_t process);
 XBT_PUBLIC int MSG_process_is_suspended(msg_process_t process);
 XBT_PUBLIC void MSG_process_restart(msg_process_t process);
 XBT_PUBLIC void MSG_process_daemonize(msg_process_t process);
+XBT_PUBLIC void MSG_process_migrate(msg_process_t process, msg_host_t host);
+XBT_PUBLIC void MSG_process_join(msg_process_t process, double timeout);
+XBT_PUBLIC void MSG_process_kill(msg_process_t process);
+XBT_PUBLIC void MSG_process_set_kill_time(msg_process_t process, double kill_time);
 
 /* ******************************** File ************************************ */
 typedef sg_file_t msg_file_t;
@@ -237,9 +243,7 @@ XBT_PUBLIC msg_process_t MSG_process_create_with_environment(const char* name, x
 XBT_PUBLIC msg_process_t MSG_process_attach(const char* name, void* data, msg_host_t host, xbt_dict_t properties);
 XBT_PUBLIC void MSG_process_detach();
 
-XBT_PUBLIC void MSG_process_kill(msg_process_t process);
 XBT_PUBLIC int MSG_process_killall();
-XBT_PUBLIC msg_error_t MSG_process_migrate(msg_process_t process, msg_host_t host);
 XBT_PUBLIC void MSG_process_yield();
 
 XBT_PUBLIC void MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup);
@@ -251,8 +255,6 @@ XBT_PUBLIC msg_process_t MSG_process_self();
 XBT_PUBLIC xbt_dynar_t MSG_processes_as_dynar();
 XBT_PUBLIC int MSG_process_get_number();
 
-XBT_PUBLIC msg_error_t MSG_process_set_kill_time(msg_process_t process, double kill_time);
-
 XBT_PUBLIC void* MSG_process_get_data(msg_process_t process);
 XBT_PUBLIC msg_error_t MSG_process_set_data(msg_process_t process, void* data);
 
@@ -282,7 +284,6 @@ XBT_PUBLIC msg_error_t MSG_parallel_task_execute_with_timeout(msg_task_t task, d
 XBT_PUBLIC void MSG_task_set_priority(msg_task_t task, double priority);
 XBT_PUBLIC void MSG_task_set_bound(msg_task_t task, double bound);
 
-XBT_PUBLIC msg_error_t MSG_process_join(msg_process_t process, double timeout);
 XBT_PUBLIC msg_error_t MSG_process_sleep(double nb_sec);
 
 XBT_PUBLIC void MSG_task_set_flops_amount(msg_task_t task, double flops_amount);
@@ -310,10 +311,6 @@ XBT_PUBLIC msg_error_t MSG_task_receive_bounded(msg_task_t* task, const char* al
 
 XBT_PUBLIC msg_comm_t MSG_task_isend(msg_task_t task, const char* alias);
 XBT_PUBLIC msg_comm_t MSG_task_isend_bounded(msg_task_t task, const char* alias, double maxrate);
-XBT_ATTRIB_DEPRECATED_v320(
-    "This function will be removed from SimGrid v3.20. If you really need this function, please speak up quickly.")
-    XBT_PUBLIC msg_comm_t MSG_task_isend_with_matching(msg_task_t task, const char* alias,
-                                                       int (*match_fun)(void*, void*, void*), void* match_data);
 
 XBT_PUBLIC void MSG_task_dsend(msg_task_t task, const char* alias, void_f_pvoid_t cleanup);
 XBT_PUBLIC void MSG_task_dsend_bounded(msg_task_t task, const char* alias, void_f_pvoid_t cleanup, double maxrate);
@@ -348,11 +345,6 @@ XBT_PUBLIC const char* MSG_task_get_category(msg_task_t task);
  */
 XBT_PUBLIC void MSG_mailbox_set_async(const char* alias);
 
-/************************** Action handling **********************************/
-XBT_PUBLIC msg_error_t MSG_action_trace_run(char* path);
-XBT_PUBLIC void MSG_action_init();
-XBT_PUBLIC void MSG_action_exit();
-
 /** @brief Opaque type representing a semaphore
  *  @ingroup msg_synchro
  *  @hideinitializer
@@ -379,8 +371,10 @@ XBT_PUBLIC void MSG_barrier_destroy(msg_bar_t bar);
 XBT_PUBLIC int MSG_barrier_wait(msg_bar_t bar);
 
 /* ****************************************************************************************** */
-/* Used only by the bindings -- unclean pimple, please ignore if you're not writing a binding */
-XBT_PUBLIC smx_context_t MSG_process_get_smx_ctx(msg_process_t process);
+/* DO NOT USE this nasty pimple (unless if you're writing a binding) */
+XBT_PUBLIC smx_context_t
+XBT_ATTRIB_DEPRECATED_v323("MSG_process_get_smx_ctx is deprecated. Please contact us if you need it.")
+MSG_process_get_smx_ctx(msg_process_t process);
 
 SG_END_DECL()