return SIMIX_storage_get_name(storage);
}
-/** \ingroup msg_storage_management
- * \brief Finds a msg_storage_t using its name.
- * \param name the name of a storage.
- * \return the corresponding storage
- */
-msg_host_t MSG_get_storage_by_name(const char *name)
-{
- return (msg_storage_t) xbt_lib_get_elm_or_null(storage_lib,name);
-}
-
/** \ingroup msg_storage_management
* \brief Returns the free space size of a storage element
* \param the storage name (#char*)
return MSG_OK;
}
-
-
/** \ingroup msg_host_management
*
- * \brief Return the user data of a #msg_storage_t.
+ * \brief Returns the user data of a #msg_storage_t.
*
* This functions checks whether \a storage is a valid pointer or not and return
the user data associated to \a storage if it is possible.
return SIMIX_storage_get_data(storage);
}
-
-
-
-
-
-
-
-
static xbt_dict_t storage_get_properties(const void *storage)
{
- return surf_resource_properties(storage);
+ return surf_resource_properties(surf_storage_resource_priv(storage));
}
static void* storage_create_resource(const char* id, const char* model,
- const char* type_id, const char* content_name, const char* content_type){
+ const char* type_id, const char* content_name, const char* content_type, xbt_dict_t properties){
storage_t storage = NULL;
xbt_assert(!surf_storage_resource_priv(surf_storage_resource_by_name(id)),
"Storage '%s' declared several times in the platform file",
id);
storage = (storage_t) surf_resource_new(sizeof(s_storage_t),
- surf_storage_model, id,NULL);
+ surf_storage_model, id, properties);
storage->generic_resource.name = xbt_strdup(id);
storage->state_current = SURF_RESOURCE_ON;
storage->size = 0;
storage->write_actions = xbt_dynar_new(sizeof(char *),NULL);
-
storage_type_t storage_type = xbt_lib_get_or_null(storage_type_lib, type_id,ROUTING_STORAGE_TYPE_LEVEL);
double Bread =
surf_parse_get_bandwidth(xbt_dict_get(storage_type->properties,"Bread"));
((storage_type_t) stype)->model,
((storage_type_t) stype)->type_id,
storage->content,
- storage->content_type);
+ storage->content_type,
+ storage->properties);
}
static void parse_mstorage_init(sg_platf_mstorage_cbarg_t mstorage)