X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9f5f2842e696f478b54c4a121fbaa44ab7d30d37..517f9e468ef336c78c2d8bc4dc36409e1e73be69:/include/simgrid/host.h diff --git a/include/simgrid/host.h b/include/simgrid/host.h index 9c81a53ed1..a7cce00f17 100644 --- a/include/simgrid/host.h +++ b/include/simgrid/host.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -10,7 +10,7 @@ #include #include -SG_BEGIN_DECL() +SG_BEGIN_DECL /** @brief Host datatype. * * A location (or host) is any possible place where an actor may run. Thus it is represented as a @@ -47,15 +47,18 @@ XBT_PUBLIC const char* sg_host_get_name(sg_host_t host); // ========== User Data ============== /** @brief Return the user data of a #sg_host_t. * - * This functions returns the user data associated to @a host if it is possible. + * This functions returns the user data associated to @a host if any. */ -XBT_PUBLIC void* sg_host_user(sg_host_t host); +XBT_PUBLIC void* sg_host_data(sg_host_t host); +XBT_ATTRIB_DEPRECATED_v328("Please use sg_host_data()") XBT_PUBLIC void* sg_host_user(sg_host_t host); /** @brief Set the user data of a #sg_host_t. * - * This functions attach @a data to @a host if it is possible. + * This functions attach @a data to @a host. */ -XBT_PUBLIC void sg_host_user_set(sg_host_t host, void* userdata); -XBT_PUBLIC void sg_host_user_destroy(sg_host_t host); +XBT_PUBLIC void sg_host_data_set(sg_host_t host, void* userdata); +XBT_ATTRIB_DEPRECATED_v328("Please use sg_host_data_set()") XBT_PUBLIC + void sg_host_user_set(sg_host_t host, void* userdata); +XBT_ATTRIB_DEPRECATED_v328("Please use sg_host_data_set(h, NULL)") XBT_PUBLIC void sg_host_user_destroy(sg_host_t host); // ========= storage related functions ============ /** @brief Return the list of mount point names on an host. @@ -79,9 +82,12 @@ XBT_PUBLIC double sg_host_get_available_speed(sg_host_t host); XBT_PUBLIC int sg_host_core_count(sg_host_t host); -/** @brief Return the location on which a process is running. - * @return the sg_host_t corresponding to the location on which @a process is running. +/** @brief Returns the current computation load (in flops per second). + * @param host a host */ +XBT_PUBLIC double sg_host_load(sg_host_t host); + +/** @brief Return the location on which the current process is running. */ XBT_PUBLIC sg_host_t sg_host_self(); XBT_PUBLIC const char* sg_host_self_get_name(); @@ -98,7 +104,6 @@ XBT_PUBLIC void sg_host_set_pstate(sg_host_t host, int pstate); XBT_PUBLIC void sg_host_turn_on(sg_host_t host); XBT_PUBLIC void sg_host_turn_off(sg_host_t host); XBT_PUBLIC int sg_host_is_on(sg_host_t host); -XBT_PUBLIC int sg_host_is_off(sg_host_t host); /** @ingroup m_host_management * @brief Returns a xbt_dict_t consisting of the list of properties assigned to this host @@ -129,9 +134,11 @@ XBT_PUBLIC void sg_host_set_property_value(sg_host_t host, const char* name, con XBT_PUBLIC void sg_host_route(sg_host_t from, sg_host_t to, xbt_dynar_t links); XBT_PUBLIC double sg_host_route_latency(sg_host_t from, sg_host_t to); XBT_PUBLIC double sg_host_route_bandwidth(sg_host_t from, sg_host_t to); +void sg_host_send_to(sg_host_t from, sg_host_t to, double byte_amount); + XBT_PUBLIC void sg_host_dump(sg_host_t ws); XBT_PUBLIC void sg_host_get_actor_list(sg_host_t host, xbt_dynar_t whereto); -SG_END_DECL() +SG_END_DECL #endif /* SIMGRID_HOST_H_ */