smx_synchro_t synchro;
/* check if the host is active */
- if (surf_host_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (host->getState() != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_get_name(host));
}
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_host_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (host->getState() != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_get_name(host));
}
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_host_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (host->getState() != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_get_name(host));
}
smx_synchro_t synchro;
/* check if the host is active */
- if (surf_host_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (host->getState() != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_get_name(host));
}
int SIMIX_file_unlink(smx_file_t fd, sg_host_t host)
{
/* check if the host is active */
- if (surf_host_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) {
+ if (host->getState() != SURF_RESOURCE_ON) {
THROWF(host_error, 0, "Host %s failed, you cannot call this function",
sg_host_get_name(host));
}
}
xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){
- xbt_assert((storage != NULL), "Invalid parameters (simix storage is NULL)");
- return (xbt_dict_t) surf_resource_get_properties((surf_cpp_resource_t)
- surf_storage_resource_priv(storage));
+ return surf_storage_get_properties(storage);
}
const char* SIMIX_storage_get_name(smx_storage_t storage){
(int)synchro->state);
}
- if (surf_host_get_state(surf_host_resource_priv(simcall->issuer->host)) != SURF_RESOURCE_ON) {
+ if (simcall->issuer->host->getState() != SURF_RESOURCE_ON) {
simcall->issuer->context->iwannadie = 1;
}