* Dramatically change the way files are handled. API and internals changed, but
this part of MSG was not considered as production grade either.
* Add explicit synchronization facilities through semaphores
+ * Add a new function MSG_host_get_process_list()
SMPI:
* SMPI is now included directly in the libsimgrid as the windows
/* int MSG_get_msgload(void); This function lacks specification; discard it */
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_avail(msg_host_t h);
XBT_PUBLIC(void) __MSG_host_destroy(msg_host_priv_t host);
XBT_PUBLIC(const char *) simcall_host_get_name(smx_host_t host);
XBT_PUBLIC(xbt_dict_t) simcall_host_get_properties(smx_host_t host);
XBT_PUBLIC(int) simcall_host_get_core(smx_host_t host);
+XBT_PUBLIC(xbt_swag_t) simcall_host_get_process_list(smx_host_t host);
XBT_PUBLIC(double) simcall_host_get_speed(smx_host_t host);
XBT_PUBLIC(double) simcall_host_get_available_speed(smx_host_t host);
/* Two possible states, 1 - CPU ON and 0 CPU OFF */
/** \ingroup m_host_management
- * \brief Return the number of core.
+ * \brief Return the number of cores.
+ *
+ * \param host a host
+ * \return the number of cores
*/
int MSG_host_get_core_number(msg_host_t h)
{
return (simcall_host_get_core(h));
}
+/** \ingroup m_host_management
+ * \brief Return the list of processes attached to an host.
+ *
+ * \param host a host
+ * \return a swag with the attached processes
+ */
+xbt_swag_t MSG_host_get_process_list(msg_host_t h)
+{
+ xbt_assert((h != NULL), "Invalid parameters");
+
+ return (simcall_host_get_process_list(h));
+}
+
+
/** \ingroup m_host_management
* \brief Returns the value of a given host property
*
get_core(host);
}
+xbt_swag_t SIMIX_pre_host_get_process_list(smx_simcall_t simcall, smx_host_t host){
+ return SIMIX_host_get_process_list(host);
+}
+
+xbt_swag_t SIMIX_host_get_process_list(smx_host_t host){
+ xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
+ smx_host_priv_t host_priv = SIMIX_host_priv(host);
+
+ return host_priv->process_list;
+}
double SIMIX_pre_host_get_available_speed(smx_simcall_t simcall, smx_host_t host){
void SIMIX_host_autorestart(smx_host_t host);
xbt_dict_t SIMIX_host_get_properties(smx_host_t host);
int SIMIX_host_get_core(smx_host_t host);
+xbt_swag_t SIMIX_host_get_process_list(smx_host_t host);
double SIMIX_host_get_speed(smx_host_t host);
double SIMIX_host_get_available_speed(smx_host_t host);
int SIMIX_host_get_state(smx_host_t host);
const char* SIMIX_pre_host_get_name(smx_simcall_t, smx_host_t);
xbt_dict_t SIMIX_pre_host_get_properties(smx_simcall_t, smx_host_t);
int SIMIX_pre_host_get_core(smx_simcall_t, smx_host_t);
+xbt_swag_t SIMIX_pre_host_get_process_list(smx_simcall_t, smx_host_t host);
double SIMIX_pre_host_get_speed(smx_simcall_t, smx_host_t);
double SIMIX_pre_host_get_available_speed(smx_simcall_t, smx_host_t);
int SIMIX_pre_host_get_state(smx_simcall_t, smx_host_t);
ACTION(SIMCALL_HOST_GET_NAME, host_get_name, WITH_ANSWER, TSTRING(result), TSPEC(host, smx_host_t)) sep \
ACTION(SIMCALL_HOST_GET_PROPERTIES, host_get_properties, WITH_ANSWER, TSPEC(result, xbt_dict_t), TSPEC(host, smx_host_t)) sep \
ACTION(SIMCALL_HOST_GET_CORE, host_get_core, WITH_ANSWER, TINT(result), TSPEC(host, smx_host_t)) sep \
+ACTION(SIMCALL_HOST_GET_PROCESS_LIST, host_get_process_list, WITH_ANSWER, TSPEC(result, xbt_swag_t), TSPEC(host, smx_host_t)) sep \
ACTION(SIMCALL_HOST_GET_SPEED, host_get_speed, WITH_ANSWER, TDOUBLE(result), TSPEC(host, smx_host_t)) sep \
ACTION(SIMCALL_HOST_GET_AVAILABLE_SPEED, host_get_available_speed, WITH_ANSWER, TDOUBLE(result), TSPEC(host, smx_host_t)) sep \
ACTION(SIMCALL_HOST_GET_STATE, host_get_state, WITH_ANSWER, TINT(result), TSPEC(host, smx_host_t)) sep \
return simcall_BODY_host_get_core(host);
}
+/**
+ * \ingroup simix_host_management
+ * \brief Returns the list of processes attached to the host.
+ *
+ * \param host A SIMIX host
+ * \return the swag of attached processes
+ */
+xbt_swag_t simcall_host_get_process_list(smx_host_t host)
+{
+ return simcall_BODY_host_get_process_list(host);
+}
/**