#include "msg/msg_mailbox.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
+#include "simgrid/simix.h"
/** @addtogroup m_host_management
* \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Hosts" --> \endhtmlonly
}
#endif
- simcall_host_set_data(workstation, host);
xbt_lib_set(host_lib,name,MSG_HOST_LEVEL,host);
return host;
*/
m_host_t MSG_get_host_by_name(const char *name)
{
- smx_host_t simix_h = NULL;
- simix_h = simcall_host_get_by_name(name);
-
- if (simix_h == NULL)
- return NULL;
-
- return (m_host_t) simcall_host_get_data(simix_h);
+ return (m_host_t) xbt_lib_get_or_null(host_lib,name,MSG_HOST_LEVEL);
}
-
/** \ingroup m_host_management
*
* \brief Set the user data of a #m_host_t.
*/
void *MSG_host_get_data(m_host_t host)
{
-
return SIMIX_host_get_data(host->smx_host);
}