X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f3c242fa5d818b0c2986ecb06e76f691e295c698..afe05b5798b5786d346dd1d1f1f29f6d246c40f1:/include/simgrid/msg.h diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index 31ed124bb3..173a1de00e 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -7,6 +7,7 @@ #define SIMGRID_MSG_H #include +#include #include #include #include @@ -14,9 +15,14 @@ #include #include #include -#include -#include -#include +#include + +#ifndef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif #ifdef __cplusplus #include @@ -122,6 +128,7 @@ typedef sg_actor_t msg_process_t; XBT_PUBLIC int MSG_process_get_PID(msg_process_t process); XBT_PUBLIC int MSG_process_get_PPID(msg_process_t process); +XBT_PUBLIC sg_actor_t MSG_process_from_PID(int pid); XBT_PUBLIC const char* MSG_process_get_name(msg_process_t process); XBT_PUBLIC sg_host_t MSG_process_get_host(msg_process_t process); @@ -135,6 +142,11 @@ 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_killall(); +XBT_PUBLIC void MSG_process_set_kill_time(msg_process_t process, double kill_time); +XBT_PUBLIC void MSG_process_yield(); /* ******************************** File ************************************ */ typedef sg_file_t msg_file_t; @@ -232,12 +244,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 void MSG_process_yield(); - XBT_PUBLIC void MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup); -XBT_PUBLIC msg_process_t MSG_process_from_PID(int PID); XBT_PUBLIC int MSG_process_self_PID(); XBT_PUBLIC int MSG_process_self_PPID(); XBT_PUBLIC const char* MSG_process_self_name(); @@ -245,8 +252,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); @@ -276,7 +281,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); @@ -338,11 +342,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 @@ -369,8 +368,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()