X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/056ac337806c0499e8e0c6e4198510eef1dcd840..4fb3673da5b0ac154b2f70e40ccd11cf8993da32:/include/simgrid/msg.h diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index 6296f2b26d..52e382b14b 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -9,6 +9,7 @@ #include "xbt.h" #include "xbt/lib.h" +#include "simgrid/forward.h" #include "simgrid/simix.h" #include "simgrid/platf.h" @@ -29,7 +30,7 @@ SG_BEGIN_DECL() typedef struct s_smx_rvpoint *msg_mailbox_t; /* ******************************** Environment ************************************ */ -typedef struct As *msg_as_t; +typedef surf_As *msg_as_t; /* ******************************** Host ************************************ */ @@ -52,6 +53,7 @@ typedef struct s_msg_host_priv { int is_migrating; xbt_dict_t affinity_mask_db; + xbt_dynar_t file_descriptor_table; #ifdef MSG_USE_DEPRECATED msg_mailbox_t *mailboxes; /**< the channels */ @@ -102,6 +104,7 @@ typedef struct msg_file_priv { char* storageId; char* storage_type; char* content_type; + int desc_id; void *data; simdata_file_t simdata; } s_msg_file_priv_t, *msg_file_priv_t; @@ -264,7 +267,7 @@ XBT_PUBLIC(msg_error_t) MSG_file_seek(msg_file_t fd, sg_offset_t offset, int ori XBT_PUBLIC(sg_size_t) MSG_file_tell (msg_file_t fd); XBT_PUBLIC(void) __MSG_file_get_info(msg_file_t fd); XBT_PUBLIC(void) __MSG_file_priv_free(msg_file_priv_t priv); -XBT_PUBLIC(const char *) MSG_file_get_name(msg_file_t storage); +XBT_PUBLIC(const char *) MSG_file_get_name(msg_file_t file); XBT_PUBLIC(msg_error_t) MSG_file_move(msg_file_t fd, const char* fullpath); XBT_PUBLIC(msg_error_t) MSG_file_rcopy(msg_file_t fd, msg_host_t host, const char* fullpath); XBT_PUBLIC(msg_error_t) MSG_file_rmove(msg_file_t fd, msg_host_t host, const char* fullpath); @@ -293,26 +296,24 @@ XBT_PUBLIC(msg_host_t) MSG_host_by_name(const char *name); #define MSG_get_host_by_name(n) MSG_host_by_name(n) /* Rewrite the old name into the new one transparently */ XBT_PUBLIC(msg_error_t) MSG_host_set_data(msg_host_t host, void *data); XBT_PUBLIC(void *) MSG_host_get_data(msg_host_t host); -XBT_PUBLIC(const char *) MSG_host_get_name(msg_host_t host); +/** \ingroup m_host_management + * + * \brief Return the name of the #msg_host_t. */ +#define MSG_host_get_name(host) sg_host_get_name(host) XBT_PUBLIC(void) MSG_host_on(msg_host_t host); XBT_PUBLIC(void) MSG_host_off(msg_host_t host); XBT_PUBLIC(msg_host_t) MSG_host_self(void); -XBT_PUBLIC(int) MSG_get_host_msgload(msg_host_t host); XBT_PUBLIC(double) MSG_get_host_speed(msg_host_t h); XBT_PUBLIC(int) MSG_host_get_core_number(msg_host_t h); XBT_PUBLIC(xbt_swag_t) MSG_host_get_process_list(msg_host_t h); XBT_PUBLIC(int) MSG_host_is_on(msg_host_t h); XBT_PUBLIC(int) MSG_host_is_off(msg_host_t h); -XBT_PUBLIC(double) MSG_host_get_wattmin_at(msg_host_t host, int pstate); -XBT_PUBLIC(double) MSG_host_get_wattmax_at(msg_host_t host, int pstate); - -XBT_PUBLIC(void) __MSG_host_destroy(msg_host_t host); XBT_PUBLIC(double) MSG_host_get_power_peak_at(msg_host_t h, int pstate); XBT_PUBLIC(double) MSG_host_get_current_power_peak(msg_host_t h); XBT_PUBLIC(int) MSG_host_get_nb_pstates(msg_host_t h); -XBT_PUBLIC(void) MSG_host_set_pstate(msg_host_t h, int pstate); -XBT_PUBLIC(int) MSG_host_get_pstate(msg_host_t host); +#define MSG_host_get_pstate(h) sg_host_get_pstate(h) +#define MSG_host_set_pstate(h, pstate) sg_host_set_pstate(h, pstate) XBT_PUBLIC(xbt_dynar_t) MSG_hosts_as_dynar(void); XBT_PUBLIC(int) MSG_get_host_number(void); XBT_PUBLIC(void) MSG_host_get_params(msg_host_t ind_pm, vm_params_t params); @@ -321,8 +322,6 @@ XBT_PUBLIC(xbt_dict_t) MSG_host_get_mounted_storage_list(msg_host_t host); XBT_PUBLIC(xbt_dynar_t) MSG_host_get_attached_storage_list(msg_host_t host); XBT_PUBLIC(xbt_dict_t) MSG_host_get_storage_content(msg_host_t host); -XBT_PUBLIC(double) MSG_host_get_consumed_energy(msg_host_t h); - /*property handlers*/ XBT_PUBLIC(xbt_dict_t) MSG_host_get_properties(msg_host_t host); XBT_PUBLIC(const char *) MSG_host_get_property_value(msg_host_t host,